public class FastByteArrayOutputStream extends OutputStream
Modifier and Type | Field and Description |
---|---|
protected byte[] |
buf |
protected int |
size |
Constructor and Description |
---|
FastByteArrayOutputStream() |
FastByteArrayOutputStream(int size) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getByteArray()
Returns the byte array containing the written data.
|
InputStream |
getInputStream()
Returns a ByteArrayInputStream for reading back the written data
|
int |
getSize() |
void |
reset() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
close, flush
public FastByteArrayOutputStream()
public FastByteArrayOutputStream(int size)
public int getSize()
public byte[] getByteArray()
public final void write(byte[] b)
write
in class OutputStream
public final void write(byte[] b, int off, int len)
write
in class OutputStream
public final void write(int b)
write
in class OutputStream
public void reset()
public InputStream getInputStream()
Copyright © 2021 The Apache Software Foundation. All rights reserved.