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) |
close, flushpublic UnsyncByteArrayOutputStream()
public UnsyncByteArrayOutputStream(int size)
public void reset()
public int size()
public byte[] toByteArray()
public String toString(String charsetName) throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic byte[] unsafeGetByteArray()
public ByteBuffer unsafeGetByteBuffer()
public void write(byte[] bytes)
write in class OutputStreampublic void write(byte[] bytes,
int offset,
int length)
write in class OutputStreampublic void write(int b)
write in class OutputStreampublic void writeTo(OutputStream outputStream) throws IOException
IOException