Class FastByteArrayOutputStream
java.lang.Object
java.io.OutputStream
org.apache.commons.imaging.common.FastByteArrayOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
Like ByteArrayOutputStream, but has some performance benefit,
because it's not thread safe.
-
Field Details
-
bytes
private final byte[] bytes -
count
private int count
-
-
Constructor Details
-
FastByteArrayOutputStream
FastByteArrayOutputStream(int length)
-
-
Method Details
-
write
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
toByteArray
public byte[] toByteArray() -
getBytesWritten
public int getBytesWritten()
-