com.distinct.rpc
Class XDRRecordInputStream

java.lang.Object
  |
  +--com.distinct.rpc.XDRStream
        |
        +--com.distinct.rpc.XDRInputStream
              |
              +--com.distinct.rpc.XDRRecordInputStream

public class XDRRecordInputStream
extends XDRInputStream

XDRInputStream implements an XDRStream that reads all encoded data from an InputStream. Use only the "decode" methods of this Stream. All encode operations will fail. Use an instance of XDROutputStream to write data to a Stream.

See Also:
XDRRecordInputStream

Field Summary
 
Fields inherited from class com.distinct.rpc.XDRStream
alloc_size, buffer, in, out
 
Constructor Summary
XDRRecordInputStream(java.io.InputStream inp)
          Creates a new XDRInputStream from a Java InputStream.
 
Method Summary
 byte get_byte()
          Reads one byte from the XDRRecordInputStream.
 byte[] get_bytes(int n)
          Reads a number of bytes from the XDRInputStream.
 int get_length()
          Reports the number of bytes available in the XDRInputStream.
 void reset()
          Clears the XDRInputStream.
 
Methods inherited from class com.distinct.rpc.XDRInputStream
setTimeout
 
Methods inherited from class com.distinct.rpc.XDRStream
dump, get_data, put_byte, put_bytes, xdr_decode_boolean, xdr_decode_char, xdr_decode_double, xdr_decode_float, xdr_decode_int, xdr_decode_long, xdr_decode_opaque, xdr_decode_opaque, xdr_decode_short, xdr_decode_string, xdr_decode_string, xdr_encode_boolean, xdr_encode_char, xdr_encode_double, xdr_encode_float, xdr_encode_int, xdr_encode_long, xdr_encode_opaque, xdr_encode_opaque, xdr_encode_short, xdr_encode_string, xdr_encode_string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XDRRecordInputStream

public XDRRecordInputStream(java.io.InputStream inp)
Creates a new XDRInputStream from a Java InputStream.

Parameters:
inp - The InputStream where all the encoded data is read from.
Method Detail

get_byte

public byte get_byte()
              throws RPCError
Reads one byte from the XDRRecordInputStream. Used by the "decode" methods.

Overrides:
get_byte in class XDRInputStream
Throws:
RPCError - When the call fails because of timeout, empty stream or other input error.

get_bytes

public byte[] get_bytes(int n)
                 throws RPCError
Reads a number of bytes from the XDRInputStream. Used by the "decode" methods.

Overrides:
get_bytes in class XDRInputStream
Parameters:
n - The number of bytes to be read.
Throws:
RPCError - When the call fails because of timeout, empty stream or other input error.

get_length

public int get_length()
Reports the number of bytes available in the XDRInputStream.

Overrides:
get_length in class XDRInputStream
Returns:
Number of bytes available.

reset

public void reset()
Clears the XDRInputStream.

Overrides:
reset in class XDRInputStream