|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream java.io.ByteArrayOutputStream net.sf.transjvm.jvm.ByteStream
public class ByteStream
An augmented ByteArrayOutputStream
Field Summary |
---|
Fields inherited from class java.io.ByteArrayOutputStream |
---|
buf, count |
Constructor Summary | |
---|---|
ByteStream(int capacity)
Constructor for the ByteStream object |
Method Summary | |
---|---|
void |
writeByteByte(int value1,
int value2)
Writes two bytes consecutively. |
void |
writeByteInt(int byteValue,
int intValue)
Writes a byte followed by an int. |
void |
writeByteShort(int byteValue,
int shortValue)
Writes a byte followed by a short. |
void |
writeByteShortShort(int byteValue,
int shortValue1,
int shortValue2)
Writes a byte followed by two consecutive shorts |
void |
writeInt(int value)
Writes an int. |
void |
writeIntAt(int mark,
int value)
Writes an int to the stream at given mark. |
void |
writeShort(int value)
Writes a short. |
void |
writeShortAt(int mark,
int value)
Writes an int to the stream at given mark. |
void |
writeTo(byte[] array,
int offset)
Writes the contents of this stream to a byte array. |
void |
writeUTF(java.lang.String s)
Writes String s to this stream in Java UTF8 format. |
Methods inherited from class java.io.ByteArrayOutputStream |
---|
close, reset, size, toByteArray, toString, toString, toString, write, write, 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 ByteStream(int capacity)
capacity
- Initial capacity of this ByteStream.Method Detail |
---|
public void writeByteByte(int value1, int value2)
value1
- First byte to be written.value2
- Secind byte to be writtenpublic void writeByteShort(int byteValue, int shortValue)
byteValue
- The byte to be writtenshortValue
- The short to be writtenpublic void writeByteShortShort(int byteValue, int shortValue1, int shortValue2)
byteValue
- The byte to be writtenshortValue1
- The first short to be writtenshortValue2
- The second short to be writtenpublic void writeByteInt(int byteValue, int intValue)
byteValue
- The byte to be writtenintValue
- The int to be writtenpublic void writeShort(int value)
value
- The short to be writtenpublic void writeInt(int value)
value
- The int to be writtenpublic void writeIntAt(int mark, int value)
mark
- Place at which to write.value
- Value to write.
java.lang.IllegalArgumentException
- if mark + 4 > size()
.public void writeShortAt(int mark, int value)
mark
- Place at which to write.value
- Value to write.
java.lang.IllegalArgumentException
- if mark + 2 > size()
.public void writeTo(byte[] array, int offset)
array
- The array to write to.offset
- Offset from start of array to write to.
java.lang.ArrayIndexOutOfBoundsException
- if size() + offset > array.length
public void writeUTF(java.lang.String s)
s
- String to be written.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |