|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
com.tivoli.twg.libs.ByteArrayOutputStr
com.tivoli.twg.engine.TWGByteArrayOutputStream
Director engine utility that implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it. The data can be retrieved using toByteArray() and toString().
Field Summary |
---|
Fields inherited from class com.tivoli.twg.libs.ByteArrayOutputStr |
---|
buf, count |
Constructor Summary | |
---|---|
TWGByteArrayOutputStream()
Creates a new byte array output stream. |
|
TWGByteArrayOutputStream(int size)
Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes. |
Method Summary | |
---|---|
static int |
lengthUTF(java.lang.String value)
lengthUTF |
void |
writeBoolean(boolean value)
Writes a boolean as a 1-byte value. |
void |
writeDouble(double value)
Writes a double using the doubleToLongBits method of of class Double as eight bytes, high byte first. |
void |
writeDouble(short length,
double[] value)
Writes an double array. |
void |
writeFloat(float value)
Writes a float using the floatToIntBits method of of class Float as four bytes, high byte first. |
void |
writeFloat(short length,
float[] value)
Writes an float array. |
void |
writeInt(int value)
Writes an int as four bytes, high byte first. |
void |
writeInt(short length,
int[] value)
Writes an int array. |
void |
writeLong(long value)
Writes a long as eight bytes, high byte first. |
void |
writeLong(short length,
long[] value)
Writes a long array. |
void |
writeShort(short value)
Writes an short as two bytes, high byte first. |
void |
writeUTF(java.lang.String value)
Writes a string using UTF-8 encoding in a machine-independent manner. |
Methods inherited from class com.tivoli.twg.libs.ByteArrayOutputStr |
---|
reset, size, toByteArray, toString, toString, toString, write, write, writeTo |
Methods inherited from class java.io.OutputStream |
---|
close, flush, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TWGByteArrayOutputStream()
public TWGByteArrayOutputStream(int size)
size
- initial size.Method Detail |
public static int lengthUTF(java.lang.String value)
public void writeBoolean(boolean value)
value
- boolean to be written.public void writeDouble(double value)
value
- double to be written.public void writeDouble(short length, double[] value)
length
- number of array elements to be written.value
- double array to be written.public void writeFloat(float value)
value
- float to be written.public void writeFloat(short length, float[] value)
length
- number of array elements to be written.value
- float array to be written.public void writeInt(int value)
value
- int to be written.public void writeInt(short length, int[] value)
length
- number of array elements to be written.value
- int array to be written.public void writeLong(long value)
value
- long to be written.public void writeLong(short length, long[] value)
length
- number of array elements to be written.value
- long array to be written.public void writeShort(short value)
value
- short to be written.public void writeUTF(java.lang.String value)
value
- String to be written.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |