|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
com.tivoli.twg.libs.ByteArrayInputStr
com.tivoli.twg.engine.TWGByteArrayInputStream
Director engine utility to create an input stream in which the bytes read are supplied by the contents of a byte array.
Field Summary |
---|
Fields inherited from class com.tivoli.twg.libs.ByteArrayInputStr |
---|
buf, count, mark, pos |
Constructor Summary | |
---|---|
TWGByteArrayInputStream(byte[] buffer)
Creates a new byte array input stream that reads data from the specified byte array. |
|
TWGByteArrayInputStream(byte[] buffer,
int offset,
int length)
Creates a new byte array input stream that reads data from the specified byte array. |
Method Summary | |
---|---|
boolean |
readBoolean()
Reads a boolean. |
double |
readDouble()
Reads a signed 64-bit long then converts it to a double using the longBitsToDouble method of class Double. |
double[] |
readDoubleArray()
Reads an array of doubles. |
float |
readFloat()
Reads a signed 32-bit integer then converts it to a float using the intBitsToFloat method of class Float. |
float[] |
readFloatArray()
Reads an array of floats. |
int |
readInt()
Reads a signed 32-bit integer. |
int[] |
readIntArray()
Reads an array of signed 32-bit integers. |
long |
readLong()
Reads a signed 64-bit integer. |
long[] |
readLongArray()
Reads an array of signed 64-bit integers. |
short |
readShort()
Reads a signed 16-bit integer. |
java.lang.String |
readUTF()
Reads in a string encoded using a modified UTF-8 format. |
Methods inherited from class com.tivoli.twg.libs.ByteArrayInputStr |
---|
available, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.io.InputStream |
---|
close, read |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TWGByteArrayInputStream(byte[] buffer)
buffer
- input buffer.public TWGByteArrayInputStream(byte[] buffer, int offset, int length)
buffer
- input buffer.offset
- offset in the buffer of the first byte to read.length
- maximum number of bytes to read from the buffer.Method Detail |
public boolean readBoolean()
public double readDouble()
public double[] readDoubleArray()
public float readFloat()
public float[] readFloatArray()
public int readInt()
public int[] readIntArray()
public long readLong()
public long[] readLongArray()
public short readShort()
public java.lang.String readUTF() throws java.io.UTFDataFormatException
java.io.UTFDataFormatException
- thrown when the bytes
do not represent a valid UTF-8 encoding of a Unicode string.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |