public class FastByteArrayOutputStream extends ByteArrayOutputStream
| Modifier and Type | Field and Description |
|---|---|
private int |
blockSize |
private byte[] |
buffer
Internal buffer.
|
private LinkedList |
buffers |
private static int |
DEFAULT_BLOCK_SIZE |
private int |
index |
private int |
size |
buf, count| Constructor and Description |
|---|
FastByteArrayOutputStream() |
FastByteArrayOutputStream(int aSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
void |
reset() |
int |
size() |
byte[] |
toByteArray() |
String |
toString() |
String |
toString(String enc) |
void |
write(byte[] data,
int offset,
int length) |
void |
write(int datum) |
void |
writeTo(OutputStream out) |
toStringwriteprivate static final int DEFAULT_BLOCK_SIZE
private byte[] buffer
private LinkedList buffers
private int index
private int size
private int blockSize
public FastByteArrayOutputStream()
public FastByteArrayOutputStream(int aSize)
public void writeTo(OutputStream out) throws IOException
writeTo in class ByteArrayOutputStreamIOExceptionpublic int size()
size in class ByteArrayOutputStreampublic byte[] toByteArray()
toByteArray in class ByteArrayOutputStreampublic void write(int datum)
write in class ByteArrayOutputStreampublic void write(byte[] data,
int offset,
int length)
write in class ByteArrayOutputStreampublic void reset()
reset in class ByteArrayOutputStreampublic String toString(String enc) throws UnsupportedEncodingException
toString in class ByteArrayOutputStreamUnsupportedEncodingExceptionpublic String toString()
toString in class ByteArrayOutputStreampublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ByteArrayOutputStreamIOException