com.atlassian.core.spool
Interface Spool

All Known Subinterfaces:
FileSpool, ThresholdingSpool
All Known Implementing Classes:
BufferedFileSpool, ByteArraySpool, DeferredSpool, SmartSpool

public interface Spool

Class that implement this interface will spool data from the provided InputStream, and return a new InputStream to the spooled data. This is useful in situations when data must be staged between sources due to differences in IO speeds and resource expenses (for example streaming JDBC blobs from databases to web clients)


Method Summary
 java.io.InputStream spool(java.io.InputStream streamToSpool)
          Return a new InputStream to the data provided.
 

Method Detail

spool

java.io.InputStream spool(java.io.InputStream streamToSpool)
                          throws java.io.IOException
Return a new InputStream to the data provided. Implementations should guarantee that the returned input stream is independent of the stream passed in. For example, the returned InputStream should still be useable once the original InputStream is closed and its associated resources are released.

Parameters:
streamToSpool - - Source stream to be spooled
Returns:
Spooled stream
Throws:
java.io.IOException


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.