public static class TemporaryBuffer.Heap extends TemporaryBuffer
If the in-memory limit is reached an IOException is thrown, rather than attempting to spool to local disk.
TemporaryBuffer.Heap, TemporaryBuffer.LocalFile
DEFAULT_IN_CORE_LIMIT
Constructor and Description |
---|
TemporaryBuffer.Heap(int limit)
Create a new heap buffer with a maximum storage limit.
|
Modifier and Type | Method and Description |
---|---|
protected OutputStream |
overflow()
Open the overflow output stream, so the remaining output can be stored.
|
close, copy, destroy, doFlush, length, openInputStream, reset, toByteArray, write, write, writeTo
flush, write
public TemporaryBuffer.Heap(int limit)
limit
- maximum number of bytes that can be stored in this buffer.
Storing beyond this many will cause an IOException to be
thrown during write.protected OutputStream overflow() throws IOException
TemporaryBuffer
overflow
in class TemporaryBuffer
IOException
- the buffer cannot create the overflow stream.Copyright © 2013. All rights reserved.