com.atlassian.core.spool
Class ByteArraySpool
java.lang.Object
com.atlassian.core.spool.ByteArraySpool
- All Implemented Interfaces:
- Spool
public class ByteArraySpool
- extends Object
- implements Spool
A very simple spool that uses a ByteArray buffer. Default buffer size is 10KiB
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteArraySpool
public ByteArraySpool()
getInitialBufferSize
public int getInitialBufferSize()
setInitialBufferSize
public void setInitialBufferSize(int initialBufferSize)
- Configure the initial size of the byte array buffer.
- Parameters:
initialBufferSize - The initial size of the buffer in bytes
spool
public InputStream spool(InputStream is)
throws IOException
- Description copied from interface:
Spool
- 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.
- Specified by:
spool in interface Spool
- Parameters:
is - - Source stream to be spooled
- Returns:
- Spooled stream
- Throws:
IOException