C# Class RiakClient.Erlang.OtpOutputStream

Provides a stream for encoding Erlang terms to external format, for transmission or storage.
Inheritance: System.IO.MemoryStream
显示文件 Open project: basho/riak-dotnet-client Class Usage Examples

Public Methods

Method Description
OtpOutputStream ( ) : System

Initializes a new instance of the OtpOutputStream class with the default initial MemoryStreamsize.

Write ( byte b ) : void

Write one byte to the stream.

Write2BE ( long n ) : void

Write the low two bytes of a value to the stream in big endian order.

Write4BE ( long n ) : void

Write the low four bytes of a value to the stream in big endian order.

Write8BE ( long n ) : void

Write the low eight (all) bytes of a value to the stream in big endian order.

WriteAtom ( string atom ) : void

Write a string to the stream as an Erlang atom. Assumes ISO-8859-1 encoding. This will throw an exception if the string can't be converted.

WriteBinary ( byte bin ) : void

Write an array of bytes to the stream as an Erlang binary.

WriteBoolean ( bool b ) : void

Write a bool value to the stream as the Erlang atom 'true' or 'false'.

WriteDouble ( double d ) : void

Write a double value to the stream.

WriteListHead ( int arity ) : void

Write an Erlang list header to the stream. After calling this method, you must write 'arity' elements to the stream followed by nil, or it will not be possible to decode it later.

WriteLong ( long l ) : void

Write a long to the stream.

WriteNil ( ) : void

Write an empty Erlang list to the stream.

WriteStringAsBinary ( string s ) : void

Write a string as a UTF-8 encoded array of bytes to the stream as an Erlang binary.

WriteTupleHead ( int arity ) : void

Write an Erlang tuple header to the stream. After calling this method, you must write 'arity' elements to the stream or it will not be possible to decode it later.

Method Details

OtpOutputStream() public method

Initializes a new instance of the OtpOutputStream class with the default initial MemoryStreamsize.
public OtpOutputStream ( ) : System
return System

Write() public method

Write one byte to the stream.
public Write ( byte b ) : void
b byte The byte to write
return void

Write2BE() public method

Write the low two bytes of a value to the stream in big endian order.
public Write2BE ( long n ) : void
n long The value to use.
return void

Write4BE() public method

Write the low four bytes of a value to the stream in big endian order.
public Write4BE ( long n ) : void
n long The value to use.
return void

Write8BE() public method

Write the low eight (all) bytes of a value to the stream in big endian order.
public Write8BE ( long n ) : void
n long The value to use.
return void

WriteAtom() public method

Write a string to the stream as an Erlang atom. Assumes ISO-8859-1 encoding. This will throw an exception if the string can't be converted.
public WriteAtom ( string atom ) : void
atom string The string to write.
return void

WriteBinary() public method

Write an array of bytes to the stream as an Erlang binary.
public WriteBinary ( byte bin ) : void
bin byte The array of bytes to write.
return void

WriteBoolean() public method

Write a bool value to the stream as the Erlang atom 'true' or 'false'.
public WriteBoolean ( bool b ) : void
b bool The boolean value to write.
return void

WriteDouble() public method

Write a double value to the stream.
public WriteDouble ( double d ) : void
d double The double to use.
return void

WriteListHead() public method

Write an Erlang list header to the stream. After calling this method, you must write 'arity' elements to the stream followed by nil, or it will not be possible to decode it later.
public WriteListHead ( int arity ) : void
arity int The number of elements in the list.
return void

WriteLong() public method

Write a long to the stream.
public WriteLong ( long l ) : void
l long The long to use.
return void

WriteNil() public method

Write an empty Erlang list to the stream.
public WriteNil ( ) : void
return void

WriteStringAsBinary() public method

Write a string as a UTF-8 encoded array of bytes to the stream as an Erlang binary.
public WriteStringAsBinary ( string s ) : void
s string The string to write.
return void

WriteTupleHead() public method

Write an Erlang tuple header to the stream. After calling this method, you must write 'arity' elements to the stream or it will not be possible to decode it later.
public WriteTupleHead ( int arity ) : void
arity int The number of elements in the tuple.
return void