|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.ByteArrayOutputStream
org.activemq.io.util.WireByteArrayOutputStream
public class WireByteArrayOutputStream
Optimized ByteArrayOutputStream
Field Summary |
---|
Fields inherited from class java.io.ByteArrayOutputStream |
---|
buf, count |
Constructor Summary | |
---|---|
WireByteArrayOutputStream()
Creates a new byte array output stream. |
|
WireByteArrayOutputStream(int size)
Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes. |
Method Summary | |
---|---|
byte[] |
getData()
|
void |
reset()
reset the output stream |
void |
restart()
start using a fresh byte array |
void |
restart(int size)
start using a fresh byte array |
void |
write(byte[] b,
int off,
int len)
Writes len bytes from the specified byte array starting at offset off to this byte
array output stream. |
void |
write(int b)
Writes the specified byte to this byte array output stream. |
Methods inherited from class java.io.ByteArrayOutputStream |
---|
close, size, toByteArray, toString, toString, toString, writeTo |
Methods inherited from class java.io.OutputStream |
---|
flush, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WireByteArrayOutputStream()
public WireByteArrayOutputStream(int size)
size
- the initial size.
IllegalArgumentException
- if size is negative.Method Detail |
---|
public void restart(int size)
size
- public void restart()
public void write(int b)
write
in class ByteArrayOutputStream
b
- the byte to be written.public void write(byte[] b, int off, int len)
len
bytes from the specified byte array starting at offset off
to this byte
array output stream.
write
in class ByteArrayOutputStream
b
- the data.off
- the start offset in the data.len
- the number of bytes to write.public byte[] getData()
public void reset()
reset
in class ByteArrayOutputStream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |