public class XDRInputStream extends FilterInputStream implements XDRDataInput
Modifier and Type | Field and Description |
---|---|
private static int |
UNIT_SIZE |
(package private) byte[] |
unit2buf |
(package private) byte[] |
unitbuf |
in
Constructor and Description |
---|
XDRInputStream(InputStream in)
Construct a new
XDRInputStream that wraps the given
stream. |
Modifier and Type | Method and Description |
---|---|
private void |
align(int length) |
boolean |
readBoolean()
Read a boolean value.
|
boolean[] |
readBooleanArray()
Read a variable-length array of boolean values.
|
void |
readBooleanVector(boolean[] array)
Read a fixed-length array of boolean values.
|
void |
readBooleanVector(boolean[] array,
int offset,
int length)
Read a fixed-length array of boolean values.
|
byte[] |
readByteArray()
Read a variable-length array of bytes.
|
void |
readByteVector(byte[] array)
Read a fixed-length array of bytes.
|
void |
readByteVector(byte[] array,
int offset,
int length)
Read a fxied-length array of bytes.
|
char |
readChar()
Read a character (8-bit integer) value.
|
double |
readDouble()
Read a double value.
|
double[] |
readDoubleArray()
Read a variable-length array of double values.
|
void |
readDoubleVector(double[] array)
Read a fixed-length array of double values.
|
void |
readDoubleVector(double[] array,
int offset,
int length)
Read a fixed-length array of double values.
|
float |
readFloat()
Read a float value.
|
float[] |
readFloatArray()
Read a variable-length array of float values.
|
void |
readFloatVector(float[] array)
Read a fixed-length array of float values.
|
void |
readFloatVector(float[] array,
int offset,
int length)
Read a fixed-length array of float values.
|
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int offset,
int length) |
int |
readInt()
Read an int (32-bit integer) value.
|
int[] |
readIntArray()
Read a variable-length array of int values (32-bit integers).
|
void |
readIntVector(int[] array)
Read a fixed-length array of int values (32-bit integers).
|
void |
readIntVector(int[] array,
int offset,
int length)
Read a fixed-length array of int values (32-bit integers).
|
long |
readLong()
Read a long (64-bit integer) value.
|
long[] |
readLongArray()
Read a variable-length array of long values (64-bit integers).
|
void |
readLongVector(long[] array)
Read a fixed-length array of long values (64-bit integers).
|
void |
readLongVector(long[] array,
int offset,
int length)
Read a variable-length array of long values (64-bit integers).
|
short |
readShort()
Read a short (16-bit integer) value.
|
short[] |
readShortArray()
Read a variable-length array of short values (16-bit integers).
|
void |
readShortVector(short[] array)
Read a fixed-length array of short values (16-bit integers).
|
void |
readShortVector(short[] array,
int offset,
int length)
Read a fixed-length array of short values (16-bit integers).
|
String |
readString()
Read a variable-length string.
|
String |
readString(int length)
Read a fixed-length string.
|
long |
readUnsignedInt()
Read an unsigned integer value (coerced to a 64-bit signed Java
long).
|
long[] |
readUnsignedIntArray()
Read a variable-length array of unsigned int values (32-bit
unsigned integers, coerced to 64-bit signed Java longs).
|
void |
readUnsignedIntVector(long[] array)
Read a fixed-length array of unsigned int values (32-bit
unsigned integers, coerced to 64-bit signed Java longs).
|
void |
readUnsignedIntVector(long[] array,
int offset,
int length)
Read a fixed-length array of unsigned int values (32-bit
unsigned integers, coerced to 64-bit signed Java longs).
|
int |
readUnsignedShort()
Read an unsigned short (unsigned 16-bit integer value, coerced to a Java
int).
|
int[] |
readUnsignedShortArray()
Read a variable-length array of unsigned short values
(16-bit unsigned integers, coerced to 32-bit signed Java ints).
|
void |
readUnsignedShortVector(int[] array)
Read a fixed-length array of unsigned short values
(16-bit unsigned integers, coerced to 32-bit signed Java ints).
|
void |
readUnsignedShortVector(int[] array,
int offset,
int length)
Read a fixed-length array of unsigned short values
(16-bit unsigned integers, coerced to 32-bit signed Java ints).
|
available, close, mark, markSupported, read, read, read, reset, skip
private static final int UNIT_SIZE
byte[] unitbuf
byte[] unit2buf
public XDRInputStream(InputStream in)
XDRInputStream
that wraps the given
stream.in
- The InputStream
to wrap.public boolean readBoolean() throws IOException
XDRDataInput
readBoolean
in interface XDRDataInput
IOException
public char readChar() throws IOException
XDRDataInput
readChar
in interface XDRDataInput
IOException
public short readShort() throws IOException
XDRDataInput
readShort
in interface XDRDataInput
IOException
public int readUnsignedShort() throws IOException
XDRDataInput
readUnsignedShort
in interface XDRDataInput
IOException
public int readInt() throws IOException
XDRDataInput
readInt
in interface XDRDataInput
IOException
public long readUnsignedInt() throws IOException
XDRDataInput
readUnsignedInt
in interface XDRDataInput
IOException
public long readLong() throws IOException
XDRDataInput
readLong
in interface XDRDataInput
IOException
public float readFloat() throws IOException
XDRDataInput
readFloat
in interface XDRDataInput
IOException
public double readDouble() throws IOException
XDRDataInput
readDouble
in interface XDRDataInput
IOException
public void readFully(byte[] b) throws IOException
IOException
public void readFully(byte[] b, int offset, int length) throws IOException
IOException
private void align(int length) throws IOException
IOException
public String readString(int length) throws IOException
XDRDataInput
readString
in interface XDRDataInput
length
- The length of the string.IOException
public String readString() throws IOException
XDRDataInput
readString
in interface XDRDataInput
IOException
public boolean[] readBooleanArray() throws IOException
XDRDataInput
readBooleanArray
in interface XDRDataInput
IOException
public void readBooleanVector(boolean[] array) throws IOException
XDRDataInput
readBooleanVector
in interface XDRDataInput
array
- The array to read into.IOException
public void readBooleanVector(boolean[] array, int offset, int length) throws IOException
XDRDataInput
readBooleanVector
in interface XDRDataInput
array
- The array to read into.offset
- The offset in the array in which to begin storing values.length
- The number of values to read.IOException
public byte[] readByteArray() throws IOException
XDRDataInput
readByteArray
in interface XDRDataInput
IOException
public void readByteVector(byte[] array) throws IOException
XDRDataInput
readByteVector
in interface XDRDataInput
array
- The array to read into.IOException
public void readByteVector(byte[] array, int offset, int length) throws IOException
XDRDataInput
readByteVector
in interface XDRDataInput
array
- The array to read into.offset
- The offset in the array in which to begin storing values.length
- The number of values to read.IOException
public short[] readShortArray() throws IOException
XDRDataInput
readShortArray
in interface XDRDataInput
IOException
public void readShortVector(short[] array) throws IOException
XDRDataInput
readShortVector
in interface XDRDataInput
array
- The array to read into.IOException
public void readShortVector(short[] array, int offset, int length) throws IOException
XDRDataInput
readShortVector
in interface XDRDataInput
array
- The array to read into.offset
- The offset in the array in which to begin storing values.length
- The number of values to read.IOException
public int[] readUnsignedShortArray() throws IOException
XDRDataInput
readUnsignedShortArray
in interface XDRDataInput
IOException
public void readUnsignedShortVector(int[] array) throws IOException
XDRDataInput
readUnsignedShortVector
in interface XDRDataInput
array
- The array to read into.IOException
public void readUnsignedShortVector(int[] array, int offset, int length) throws IOException
XDRDataInput
readUnsignedShortVector
in interface XDRDataInput
array
- The array to read into.offset
- The offset in the array in which to begin storing values.length
- The number of values to read.IOException
public int[] readIntArray() throws IOException
XDRDataInput
readIntArray
in interface XDRDataInput
IOException
public void readIntVector(int[] array) throws IOException
XDRDataInput
readIntVector
in interface XDRDataInput
array
- The array to read into.IOException
public void readIntVector(int[] array, int offset, int length) throws IOException
XDRDataInput
readIntVector
in interface XDRDataInput
array
- The array to read into.offset
- The offset in the array in which to begin storing values.length
- The number of values to read.IOException
public long[] readUnsignedIntArray() throws IOException
XDRDataInput
readUnsignedIntArray
in interface XDRDataInput
IOException
public void readUnsignedIntVector(long[] array) throws IOException
XDRDataInput
readUnsignedIntVector
in interface XDRDataInput
array
- The array to read into.IOException
public void readUnsignedIntVector(long[] array, int offset, int length) throws IOException
XDRDataInput
readUnsignedIntVector
in interface XDRDataInput
array
- The array to read into.offset
- The offset in the array in which to begin storing values.length
- The number of values to read.IOException
public long[] readLongArray() throws IOException
XDRDataInput
readLongArray
in interface XDRDataInput
IOException
public void readLongVector(long[] array) throws IOException
XDRDataInput
readLongVector
in interface XDRDataInput
array
- The array to read into.IOException
public void readLongVector(long[] array, int offset, int length) throws IOException
XDRDataInput
readLongVector
in interface XDRDataInput
array
- The array to read into.offset
- The offset in the array in which to begin storing values.length
- The number of values to read.IOException
public float[] readFloatArray() throws IOException
XDRDataInput
readFloatArray
in interface XDRDataInput
IOException
public void readFloatVector(float[] array) throws IOException
XDRDataInput
readFloatVector
in interface XDRDataInput
array
- The array to read into.IOException
public void readFloatVector(float[] array, int offset, int length) throws IOException
XDRDataInput
readFloatVector
in interface XDRDataInput
array
- The array to read into.offset
- The offset in the array in which to begin storing values.length
- The number of values to read.IOException
public double[] readDoubleArray() throws IOException
XDRDataInput
readDoubleArray
in interface XDRDataInput
IOException
public void readDoubleVector(double[] array) throws IOException
XDRDataInput
readDoubleVector
in interface XDRDataInput
array
- The array to read into.IOException
public void readDoubleVector(double[] array, int offset, int length) throws IOException
XDRDataInput
readDoubleVector
in interface XDRDataInput
array
- The array to read into.offset
- The offset in the array in which to begin storing values.length
- The number of values to read.IOException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses