C# Class RiakClient.Erlang.OtpInputStream

Provides a stream for decoding Erlang terms from external format.
Inheritance: System.IO.MemoryStream
Mostrar archivo Open project: basho/riak-dotnet-client Class Usage Examples

Public Methods

Method Description
IsLongTag ( byte tag ) : bool

Can the tag be parsed as a long

OtpInputStream ( byte buffer ) : System

Initializes a new instance of the OtpInputStream class from a buffer containing encoded Erlang terms.

OtpInputStream ( byte buffer, int index, int count ) : System

Initializes a new instance of the OtpInputStream class from a buffer containing encoded Erlang terms at the given offset and length.

Peek ( ) : byte

Look ahead one position in the stream without consuming the byte found there.

Peek1 ( ) : byte

Look ahead one position in the stream without consuming the byte found there.

Peek1SkipVersion ( ) : byte

Look ahead one position in the stream, skipping the version tag if it's read.

Read1 ( ) : byte

Read one byte from the stream.

Read1SkipVersion ( ) : byte

Read one byte from the stream, skipping the version tag if it's read.

Read2BE ( ) : int

Read a two byte big endian integer from the stream.

Read4BE ( ) : int

Read a four byte big endian integer from the stream.

ReadAtom ( ) : string

Read an Erlang atom from the stream.

ReadBE ( int n ) : long

Read a bigendian integer from the stream.

ReadBinary ( ) : byte[]

Read an Erlang binary from the stream.

ReadBinaryAsString ( ) : string

Read an Erlang binary from the stream and converts to a UTF-8 string.

ReadBoolean ( ) : bool

Read an Erlang atom from the stream and interpret the value as a boolean.

ReadDouble ( ) : double

Read an Erlang float from the stream.

ReadListHead ( ) : int

Read a list header from the stream.

ReadLong ( ) : long

Read an array of bytes

ReadN ( byte buffer ) : int

Read an array of bytes from the stream into the buffer. The method reads at most buffer.Length bytes from the input stream.

ReadN ( byte buffer, int offset, int count ) : int

Read an array of bytes from the stream. The method reads at most len bytes from the input stream into offset off of the buffer.

ReadNil ( ) : int
ReadTupleHead ( ) : int

Read a tuple header from the stream.

Private Methods

Method Description
OnBadTag ( byte got ) : Exception

Method Details

IsLongTag() public method

Can the tag be parsed as a long
public IsLongTag ( byte tag ) : bool
tag byte the tag to check
return bool

OtpInputStream() public method

Initializes a new instance of the OtpInputStream class from a buffer containing encoded Erlang terms.
public OtpInputStream ( byte buffer ) : System
buffer byte The buffer containing Erlang terms.
return System

OtpInputStream() public method

Initializes a new instance of the OtpInputStream class from a buffer containing encoded Erlang terms at the given offset and length.
public OtpInputStream ( byte buffer, int index, int count ) : System
buffer byte The buffer containing Erlang terms.
index int The index into buffer at which the stream begins.
count int The length of the stream in bytes.
return System

Peek() public method

Look ahead one position in the stream without consuming the byte found there.
public Peek ( ) : byte
return byte

Peek1() public method

Look ahead one position in the stream without consuming the byte found there.
public Peek1 ( ) : byte
return byte

Peek1SkipVersion() public method

Look ahead one position in the stream, skipping the version tag if it's read.
public Peek1SkipVersion ( ) : byte
return byte

Read1() public method

Read one byte from the stream.
public Read1 ( ) : byte
return byte

Read1SkipVersion() public method

Read one byte from the stream, skipping the version tag if it's read.
public Read1SkipVersion ( ) : byte
return byte

Read2BE() public method

Read a two byte big endian integer from the stream.
public Read2BE ( ) : int
return int

Read4BE() public method

Read a four byte big endian integer from the stream.
public Read4BE ( ) : int
return int

ReadAtom() public method

Read an Erlang atom from the stream.
public ReadAtom ( ) : string
return string

ReadBE() public method

Read a bigendian integer from the stream.
public ReadBE ( int n ) : long
n int The number of bytes to read
return long

ReadBinary() public method

Read an Erlang binary from the stream.
public ReadBinary ( ) : byte[]
return byte[]

ReadBinaryAsString() public method

Read an Erlang binary from the stream and converts to a UTF-8 string.
public ReadBinaryAsString ( ) : string
return string

ReadBoolean() public method

Read an Erlang atom from the stream and interpret the value as a boolean.
public ReadBoolean ( ) : bool
return bool

ReadDouble() public method

Read an Erlang float from the stream.
public ReadDouble ( ) : double
return double

ReadListHead() public method

Read a list header from the stream.
public ReadListHead ( ) : int
return int

ReadLong() public method

Read an array of bytes
public ReadLong ( ) : long
return long

ReadN() public method

Read an array of bytes from the stream into the buffer. The method reads at most buffer.Length bytes from the input stream.
public ReadN ( byte buffer ) : int
buffer byte The buffer into which to read data.
return int

ReadN() public method

Read an array of bytes from the stream. The method reads at most len bytes from the input stream into offset off of the buffer.
public ReadN ( byte buffer, int offset, int count ) : int
buffer byte The buffer into which to read data.
offset int The offset in the buffer into which to read data.
count int The number of bytes to read.
return int

ReadNil() public method

public ReadNil ( ) : int
return int

ReadTupleHead() public method

Read a tuple header from the stream.
public ReadTupleHead ( ) : int
return int