Package arc.util.io
Class Streams.OptimizedByteArrayOutputStream
java.lang.Object
java.io.OutputStream
java.io.ByteArrayOutputStream
arc.util.io.Streams.OptimizedByteArrayOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
- Enclosing class:
- Streams
A ByteArrayOutputStream which avoids copying of the byte array if possible.
-
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, toString, toString, toString, toString, write, write, writeBytes, writeTo
Methods inherited from class java.io.OutputStream
flush, nullOutputStream, write
-
Constructor Details
-
OptimizedByteArrayOutputStream
public OptimizedByteArrayOutputStream(int initialSize)
-
-
Method Details
-
toByteArray
public byte[] toByteArray()- Overrides:
toByteArray
in classByteArrayOutputStream
-
getBuffer
public byte[] getBuffer()
-