|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
com.ezware.oxbow.swingbits.util.copy.FastByteArrayOutputStream
public class FastByteArrayOutputStream
ByteArrayOutputStream implementation that doesn't synchronize methods and doesn't copy the data on toByteArray().
| Field Summary | |
|---|---|
protected byte[] |
buf
Buffer and size |
protected int |
size
|
| Constructor Summary | |
|---|---|
FastByteArrayOutputStream()
Constructs a stream with buffer capacity size 5K |
|
FastByteArrayOutputStream(int initSize)
Constructs a stream with the given initial size |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.io.OutputStream |
|---|
close, flush |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected byte[] buf
protected int size
| Constructor Detail |
|---|
public FastByteArrayOutputStream()
public FastByteArrayOutputStream(int initSize)
| Method Detail |
|---|
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 OutputStreampublic final void write(int b)
write in class OutputStreampublic void reset()
public InputStream getInputStream()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||