public class UnsyncByteArrayOutputStream
extends OutputStream
See https://issues.liferay.com/browse/LPS-6648.
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buffer |
protected int |
index |
Constructor and Description |
---|
UnsyncByteArrayOutputStream() |
UnsyncByteArrayOutputStream(int size) |
Modifier and Type | Method and Description |
---|---|
void |
reset() |
int |
size() |
byte[] |
toByteArray() |
String |
toString() |
String |
toString(String charsetName) |
byte[] |
unsafeGetByteArray() |
ByteBuffer |
unsafeGetByteBuffer() |
void |
write(byte[] bytes) |
void |
write(byte[] bytes,
int offset,
int length) |
void |
write(int b) |
void |
writeTo(OutputStream outputStream) |
public UnsyncByteArrayOutputStream()
public UnsyncByteArrayOutputStream(int size)
public void reset()
public int size()
public byte[] toByteArray()
public String toString()
toString
in class Object
public String toString(String charsetName) throws UnsupportedEncodingException
UnsupportedEncodingException
public byte[] unsafeGetByteArray()
public ByteBuffer unsafeGetByteBuffer()
public void write(byte[] bytes)
write
in class OutputStream
public void write(byte[] bytes, int offset, int length)
write
in class OutputStream
public void write(int b)
write
in class OutputStream
public void writeTo(OutputStream outputStream) throws IOException
IOException