Package com.liferay.petra.io.unsync
Class UnsyncByteArrayOutputStream
java.lang.Object
java.io.OutputStream
com.liferay.petra.io.unsync.UnsyncByteArrayOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
See https://issues.liferay.com/browse/LPS-6648.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.io.OutputStream
close, flush, nullOutputStream
-
Constructor Details
-
UnsyncByteArrayOutputStream
public UnsyncByteArrayOutputStream() -
UnsyncByteArrayOutputStream
public UnsyncByteArrayOutputStream(int size)
-
-
Method Details
-
reset
public void reset() -
size
public int size() -
toByteArray
public byte[] toByteArray() -
toString
-
toString
- Throws:
UnsupportedEncodingException
-
unsafeGetByteArray
public byte[] unsafeGetByteArray() -
unsafeGetByteBuffer
-
write
public void write(byte[] bytes) - Overrides:
write
in classOutputStream
-
write
public void write(byte[] bytes, int offset, int length) - Overrides:
write
in classOutputStream
-
write
public void write(int b) - Specified by:
write
in classOutputStream
-
writeTo
- Throws:
IOException
-