|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.OutputStream
org.apache.activemq.util.DataByteArrayOutputStream
public final class DataByteArrayOutputStream
Optimized ByteArrayOutputStream
| Constructor Summary | |
|---|---|
DataByteArrayOutputStream()
Creates a new byte array output stream. |
|
DataByteArrayOutputStream(int size)
Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes. |
|
| Method Summary | |
|---|---|
byte[] |
getData()
|
void |
position(int offset)
Set the current position for writing |
void |
reset()
reset the output stream |
void |
restart()
start using a fresh byte array |
void |
restart(int size)
start using a fresh byte array |
int |
size()
|
ByteSequence |
toByteSequence()
Get a ByteSequence from the stream |
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. |
void |
writeBoolean(boolean v)
|
void |
writeByte(int v)
|
void |
writeBytes(java.lang.String s)
|
void |
writeChar(int v)
|
void |
writeChars(java.lang.String s)
|
void |
writeDouble(double v)
|
void |
writeFloat(float v)
|
void |
writeInt(int v)
|
void |
writeLong(long v)
|
void |
writeShort(int v)
|
void |
writeUTF(java.lang.String str)
|
| Methods inherited from class java.io.OutputStream |
|---|
close, flush, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.io.DataOutput |
|---|
write |
| Constructor Detail |
|---|
public DataByteArrayOutputStream(int size)
size - the initial size.
java.lang.IllegalArgumentException - if size is negative.public DataByteArrayOutputStream()
| Method Detail |
|---|
public void restart(int size)
size - public void restart()
public ByteSequence toByteSequence()
public void write(int b)
write in interface java.io.DataOutputwrite in class java.io.OutputStreamb - 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 interface java.io.DataOutputwrite in class java.io.OutputStreamb - the data.off - the start offset in the data.len - the number of bytes to write.public byte[] getData()
public void reset()
public void position(int offset)
offset - public int size()
public void writeBoolean(boolean v)
writeBoolean in interface java.io.DataOutputpublic void writeByte(int v)
writeByte in interface java.io.DataOutputpublic void writeShort(int v)
writeShort in interface java.io.DataOutputpublic void writeChar(int v)
writeChar in interface java.io.DataOutputpublic void writeInt(int v)
writeInt in interface java.io.DataOutputpublic void writeLong(long v)
writeLong in interface java.io.DataOutput
public void writeFloat(float v)
throws java.io.IOException
writeFloat in interface java.io.DataOutputjava.io.IOException
public void writeDouble(double v)
throws java.io.IOException
writeDouble in interface java.io.DataOutputjava.io.IOExceptionpublic void writeBytes(java.lang.String s)
writeBytes in interface java.io.DataOutputpublic void writeChars(java.lang.String s)
writeChars in interface java.io.DataOutput
public void writeUTF(java.lang.String str)
throws java.io.IOException
writeUTF in interface java.io.DataOutputjava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||