public final class CachedByteArrayOutputStream extends ByteArrayOutputStream
ByteArrayOutputStream
that is capable of returning a
InputStreamCache
view of the buffer.
This implementation avoids any buffer copying when caching in memory InputStream
as the buffer can be shared.buf, count
Constructor and Description |
---|
CachedByteArrayOutputStream(int size) |
Modifier and Type | Method and Description |
---|---|
InputStreamCache |
newInputStreamCache()
Creates a new
InputStreamCache view of the byte array |
close, reset, size, toByteArray, toString, toString, toString, write, write, writeTo
flush, write
public CachedByteArrayOutputStream(int size)
public InputStreamCache newInputStreamCache()
InputStreamCache
view of the byte arrayApache Camel