uka.transport
Class BinaryInputStream
java.lang.Object
java.io.InputStream
uka.transport.BinaryInputStream
- All Implemented Interfaces:
- java.io.DataInput, TransportConstants
- Direct Known Subclasses:
- UnmarshalStream
- public class BinaryInputStream
- extends java.io.InputStream
- implements java.io.DataInput, TransportConstants
- Author:
- Bernhard Haumacher
|
Field Summary |
protected byte[] |
buf
|
protected int |
bufcnt
|
protected int |
buflen
|
(package private) java.lang.StringBuffer |
cbuffer
|
protected java.io.InputStream |
in
|
| Fields inherited from class java.io.InputStream |
|
| Fields inherited from interface uka.transport.TransportConstants |
REQUEST_MAX, REQUEST_MAX_boolean, REQUEST_MAX_byte, REQUEST_MAX_char, REQUEST_MAX_double, REQUEST_MAX_float, REQUEST_MAX_int, REQUEST_MAX_long, REQUEST_MAX_short, SIZEOF_boolean, SIZEOF_byte, SIZEOF_char, SIZEOF_double, SIZEOF_float, SIZEOF_int, SIZEOF_long, SIZEOF_short, TC_ANONYMOUS, TC_DEFAULT, TC_EXCEPTION, TC_NEW, TC_NULL, TC_REFERENCE, TC_REPLACEMENT, TC_RESET, TC_RESETTYPE, TC_TYPE, TC_USER |
|
Method Summary |
void |
accept(int length)
|
int |
available()
|
void |
close()
|
byte[] |
getBuffer()
|
int |
getPosition()
|
int |
read()
|
int |
read(byte[] data)
|
int |
read(byte[] data,
int _offset,
int length)
|
boolean |
readBoolean()
|
byte |
readByte()
|
char |
readChar()
|
java.lang.String |
readChars()
|
double |
readDouble()
|
float |
readFloat()
|
void |
readFully(byte[] data)
|
void |
readFully(byte[] data,
int offset,
int length)
|
void |
readHugeBooleanArray(boolean[] array,
int offset,
int length)
|
void |
readHugeByteArray(byte[] array,
int offset,
int length)
|
void |
readHugeCharArray(char[] array,
int offset,
int length)
|
void |
readHugeDoubleArray(double[] array,
int offset,
int length)
|
void |
readHugeFloatArray(float[] array,
int offset,
int length)
|
void |
readHugeIntArray(int[] array,
int offset,
int length)
|
void |
readHugeLongArray(long[] array,
int offset,
int length)
|
void |
readHugeShortArray(short[] array,
int offset,
int length)
|
int |
readInt()
|
java.lang.String |
readLine()
|
long |
readLong()
|
short |
readShort()
|
int |
readUnsignedByte()
|
int |
readUnsignedShort()
|
java.lang.String |
readUTF()
|
void |
request(int length)
|
protected int |
requestTest(int length)
|
long |
skip(long n)
|
int |
skipBytes(int n)
|
| Methods inherited from class java.io.InputStream |
mark, markSupported, reset |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
in
protected java.io.InputStream in
buflen
protected int buflen
bufcnt
protected int bufcnt
buf
protected byte[] buf
cbuffer
java.lang.StringBuffer cbuffer
BinaryInputStream
public BinaryInputStream(java.io.InputStream in)
available
public int available()
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read()
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read(byte[] data)
throws java.io.IOException
- Throws:
java.io.IOException
read
public int read(byte[] data,
int _offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
skip
public long skip(long n)
throws java.io.IOException
- Throws:
java.io.IOException
skipBytes
public int skipBytes(int n)
throws java.io.IOException
- Specified by:
skipBytes in interface java.io.DataInput
- Throws:
java.io.IOException
readFully
public void readFully(byte[] data)
throws java.io.IOException
- Specified by:
readFully in interface java.io.DataInput
- Throws:
java.io.IOException
readFully
public final void readFully(byte[] data,
int offset,
int length)
throws java.io.IOException
- Specified by:
readFully in interface java.io.DataInput
- Throws:
java.io.IOException
readLine
public java.lang.String readLine()
throws java.io.IOException
- Specified by:
readLine in interface java.io.DataInput
- Throws:
java.io.IOException
readUTF
public java.lang.String readUTF()
throws java.io.IOException
- Specified by:
readUTF in interface java.io.DataInput
- Throws:
java.io.IOException
readChars
public java.lang.String readChars()
throws java.io.IOException
- Throws:
java.io.IOException
readHugeByteArray
public void readHugeByteArray(byte[] array,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException- See Also:
BinaryOutputStream.writeHugeByteArray(byte[], int, int)
readHugeIntArray
public void readHugeIntArray(int[] array,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException- See Also:
BinaryOutputStream.writeHugeDoubleArray(double[], int, int)
readHugeCharArray
public void readHugeCharArray(char[] array,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException- See Also:
BinaryOutputStream.writeHugeDoubleArray(double[], int, int)
readHugeFloatArray
public void readHugeFloatArray(float[] array,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException- See Also:
BinaryOutputStream.writeHugeDoubleArray(double[], int, int)
readHugeLongArray
public void readHugeLongArray(long[] array,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException- See Also:
BinaryOutputStream.writeHugeDoubleArray(double[], int, int)
readHugeDoubleArray
public void readHugeDoubleArray(double[] array,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException- See Also:
BinaryOutputStream.writeHugeDoubleArray(double[], int, int)
readHugeShortArray
public void readHugeShortArray(short[] array,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException- See Also:
BinaryOutputStream.writeHugeDoubleArray(double[], int, int)
readHugeBooleanArray
public void readHugeBooleanArray(boolean[] array,
int offset,
int length)
throws java.io.IOException
- Throws:
java.io.IOException- See Also:
BinaryOutputStream.writeHugeDoubleArray(double[], int, int)
getBuffer
public final byte[] getBuffer()
getPosition
public final int getPosition()
request
public final void request(int length)
throws java.io.IOException
- Throws:
java.io.IOException
accept
public final void accept(int length)
throws java.io.IOException
- Throws:
java.io.IOException
requestTest
protected final int requestTest(int length)
throws java.io.IOException
- Throws:
java.io.IOException
readBoolean
public final boolean readBoolean()
throws java.io.IOException
- Specified by:
readBoolean in interface java.io.DataInput
- Throws:
java.io.IOException
readByte
public final byte readByte()
throws java.io.IOException
- Specified by:
readByte in interface java.io.DataInput
- Throws:
java.io.IOException
readChar
public final char readChar()
throws java.io.IOException
- Specified by:
readChar in interface java.io.DataInput
- Throws:
java.io.IOException
readShort
public final short readShort()
throws java.io.IOException
- Specified by:
readShort in interface java.io.DataInput
- Throws:
java.io.IOException
readInt
public final int readInt()
throws java.io.IOException
- Specified by:
readInt in interface java.io.DataInput
- Throws:
java.io.IOException
readLong
public final long readLong()
throws java.io.IOException
- Specified by:
readLong in interface java.io.DataInput
- Throws:
java.io.IOException
readFloat
public final float readFloat()
throws java.io.IOException
- Specified by:
readFloat in interface java.io.DataInput
- Throws:
java.io.IOException
readDouble
public final double readDouble()
throws java.io.IOException
- Specified by:
readDouble in interface java.io.DataInput
- Throws:
java.io.IOException
readUnsignedShort
public final int readUnsignedShort()
throws java.io.IOException
- Specified by:
readUnsignedShort in interface java.io.DataInput
- Throws:
java.io.IOException
readUnsignedByte
public final int readUnsignedByte()
throws java.io.IOException
- Specified by:
readUnsignedByte in interface java.io.DataInput
- Throws:
java.io.IOException