Class FastByteArrayOutputStream
java.lang.Object
java.io.OutputStream
com.fastasyncworldedit.core.internal.io.FastByteArrayOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
A speedy implementation of ByteArrayOutputStream. It's not synchronized, and it
does not copy buffers when it's expanded. There's also no copying of the internal buffer
if it's contents is extracted with the writeTo(stream) method.
-
Constructor Summary
ConstructorDescriptionFastByteArrayOutputStream
(byte[] buffer) FastByteArrayOutputStream
(int aSize) -
Method Summary
Methods inherited from class java.io.OutputStream
flush, nullOutputStream
-
Constructor Details
-
FastByteArrayOutputStream
public FastByteArrayOutputStream() -
FastByteArrayOutputStream
public FastByteArrayOutputStream(int aSize) -
FastByteArrayOutputStream
public FastByteArrayOutputStream(byte[] buffer)
-
-
Method Details
-
getSize
public int getSize() -
toByteArrays
public byte[][] toByteArrays() -
toByteArray
public byte[] toByteArray() -
toString
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
public void write(int datum) - Specified by:
write
in classOutputStream
-
write
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
writeTo
- Throws:
IOException
-
writeTo
- Throws:
IOException
-
writeTo
- Throws:
IOException
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
-
reset
public void reset()
-