Class CachedByteArrayOutputStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
org.apache.camel.converter.stream.CachedByteArrayOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
A
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.-
Field Summary
Fields inherited from class java.io.ByteArrayOutputStream
buf, count
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.ByteArrayOutputStream
close, reset, size, toByteArray, toString, toString, toString, toString, write, write, writeBytes, writeTo
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
Constructor Details
-
CachedByteArrayOutputStream
public CachedByteArrayOutputStream(int size)
-
-
Method Details
-
newInputStreamCache
Creates a newInputStreamCache
view of the byte array
-