Package de.intarsys.tools.stream
Class FastByteArrayOutputStream
java.lang.Object
java.io.OutputStream
de.intarsys.tools.stream.FastByteArrayOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream, write
-
Field Details
-
buf
protected byte[] bufThe buffer where data is stored. -
count
protected int countThe number of valid bytes in the buffer.
-
-
Constructor Details
-
FastByteArrayOutputStream
public FastByteArrayOutputStream() -
FastByteArrayOutputStream
public FastByteArrayOutputStream(int size)
-
-
Method Details
-
getBytes
public byte[] getBytes() -
reset
public void reset() -
size
public int size() -
toByteArray
public byte[] toByteArray() -
write
public void write(byte[] b, int off, int len) - Overrides:
write
in classOutputStream
-
write
public void write(int b) - Specified by:
write
in classOutputStream
-