public final class NoSyncByteArrayOutputStream extends ByteArrayOutputStream
getBytes() gives direct access to byte buffer.buf, count| Constructor and Description |
|---|
NoSyncByteArrayOutputStream() |
NoSyncByteArrayOutputStream(int size) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBytes()
Get original byte buffer instead create copy of it as
toByteArray() does. |
void |
reset() |
int |
size() |
byte[] |
toByteArray() |
String |
toString() |
String |
toString(String charsetName) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeTo(OutputStream out) |
close, toStringflushpublic NoSyncByteArrayOutputStream()
public NoSyncByteArrayOutputStream(int size)
public byte[] getBytes()
toByteArray() does.public void reset()
reset in class ByteArrayOutputStreampublic int size()
size in class ByteArrayOutputStreampublic byte[] toByteArray()
toByteArray in class ByteArrayOutputStreampublic String toString()
toString in class ByteArrayOutputStreampublic String toString(String charsetName) throws UnsupportedEncodingException
toString in class ByteArrayOutputStreamUnsupportedEncodingExceptionpublic void write(byte[] b)
write in class OutputStreampublic void write(byte[] b,
int off,
int len)
write in class ByteArrayOutputStreampublic void write(int b)
write in class ByteArrayOutputStreampublic void writeTo(OutputStream out) throws IOException
writeTo in class ByteArrayOutputStreamIOExceptionCopyright © 2012–2016 Codenvy, S.A.. All rights reserved.