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 |
---|
Heap(int limit)
Create a new heap buffer with a maximum storage limit.
|
Heap(int estimatedSize,
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, openInputStreamWithAutoDestroy, reset, toByteArray, toByteArray, write, write, writeTo
flush, write
public Heap(int limit)
limit
- maximum number of bytes that can be stored in this buffer;
also used as the estimated size. Storing beyond this many
will cause an IOException to be thrown during write.public Heap(int estimatedSize, int limit)
estimatedSize
- estimated size of storage used, to size the initial list of
block pointers.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 © 2019 Eclipse JGit Project. All rights reserved.