C# Class hessiancsharp.io.CHessianOutput

Output stream for Hessian requests

HessianOutput is unbuffered, so any client needs to provide its own buffering.

Inheritance: AbstractHessianOutput
Mostra file Open project: timfel/csharp-hessian Class Usage Examples

Protected Properties

Property Type Description
m_srOutput Stream

Public Methods

Method Description
AddRef ( object objReference ) : bool

Adds an object to the reference list. If the object already exists, writes the reference, otherwise, the caller is responsible for the serialization R b32 b24 b16 b8

CHessianOutput ( Stream srOutput ) : System

Constructor

Call ( string strMethod, object args ) : void

Writes a complete method call.

CompleteCall ( ) : void

Completes call z

CompleteReply ( ) : void

Completes reading the reply. A successful completion will have a single value: z

Init ( Stream srOutput ) : void

Initializes the output

PrintLenString ( string strValue ) : void

Prints a string to the stream, encoded as UTF-8 with preceeding length

PrintString ( String strValue ) : void

Prints a string to the stream, encoded as UTF-8

PrintString ( char arrData, int intOffset, int intLength ) : void

Prints a char array to the stream, encoded as UTF-8

PrintString ( string strValue, int intOffset, int intLength ) : void

Prints a string to the stream, encoded as UTF-8

RemoveRef ( object objReference ) : bool

Removes a reference

ReplaceRef ( object objOldReference, object objNewReference ) : bool

Replaces a reference from one object to another

StartCall ( string strMethod ) : void

Starts the method call. Clients would use startCall instead of call if they wanted finer control over writing the arguments, or needed to write headers. c major minor m b16 b8 method-name

StartReply ( ) : void

Starts the reply. A successful completion will have a single value: r

WriteBoolean ( bool blnValue ) : void

Writes a boolean value to the stream. The boolean will be written with the following syntax: T F

WriteByteBufferEnd ( byte arrBuffer, int intOffset, int intLength ) : void

Writes the last chunk of a byte buffer to the stream b b16 b18 bytes

WriteByteBufferPart ( byte arrBuffer, int intOffset, int intLength ) : void

Writes a part of the byte buffer to the stream b b16 b18 bytes

WriteBytes ( byte arrBuffer ) : void

Writes a byte array to the stream. The array will be written with the following syntax: B b16 b18 bytes

WriteBytes ( byte arrBuffer, int intOffset, int intLength ) : void

Writes a byte array to the stream. The array will be written with the following syntax: B b16 b18 bytes

WriteDouble ( double dblValue ) : void

Writes a double value to the stream. The double will be written with the following syntax: D b64 b56 b48 b40 b32 b24 b16 b8

WriteFault ( string strCode, string strMessage, object objDetail ) : void

Writes a fault. The fault will be written as a descriptive string followed by an object: f <string>code <string>the fault code <string>message <string>the fault mesage <string>detail mt\x00\xnnException ... z z

WriteHeader ( string strHeaderName ) : void

Writes a header name. The header value must immediately follow. H b16 b8 foo values

WriteInt ( int intValue ) : void

Writes an integer value to the stream. The integer will be written with the following syntax: I b32 b24 b16 b8

WriteListBegin ( int intLength, string strType ) : void

Writes the list header to the stream. List writers will call writeListBegin followed by the list contents and then call writeListEnd. V t b16 b8 type l b32 b24 b16 b8

WriteListEnd ( ) : void

Writes the tail of the list to the stream.

WriteLong ( long lngValue ) : void

Writes a long value to the stream. The long will be written with the following syntax: L b64 b56 b48 b40 b32 b24 b16 b8

WriteMapBegin ( string strType ) : void

Writes the map header to the stream. Map writers will call writeMapBegin followed by the map contents and then call writeMapEnd. Mt b16 b8 (<key> <value>)z

WriteMapEnd ( ) : void

Writes the tail of the map to the stream.

WriteNull ( ) : void

Writes a null value to the stream. The null will be written with the following syntax N

WriteObject ( object obj ) : void

Writes any object to the output stream.

WriteRef ( int intValue ) : void

Writes a reference R b32 b24 b16 b8

WriteRemote ( string strType, string strUrl ) : void

Writes a remote object reference to the stream. The type is the type of the remote interface. 'r' 't' b16 b8 type url

WriteString ( char arrBuffer, int intOffset, int intLength ) : void

Writes a string value to the stream using UTF-8 encoding. The string will be written with the following syntax: S b16 b8 string-value

WriteString ( string strValue ) : void

Writes a string value to the stream using UTF-8 encoding. The string will be written with the following syntax: S b16 b8 string-value

WriteUTCDate ( long lngTime ) : void

Writes a date to the stream. d b64 b56 b48 b40 b32 b24 b16 b8

Method Details

AddRef() public method

Adds an object to the reference list. If the object already exists, writes the reference, otherwise, the caller is responsible for the serialization R b32 b24 b16 b8
public AddRef ( object objReference ) : bool
objReference object the object to add as a reference
return bool

CHessianOutput() public method

Constructor
public CHessianOutput ( Stream srOutput ) : System
srOutput Stream Output stream
return System

Call() public method

Writes a complete method call.
public Call ( string strMethod, object args ) : void
strMethod string Method name
args object Method args
return void

CompleteCall() public method

Completes call z
public CompleteCall ( ) : void
return void

CompleteReply() public method

Completes reading the reply. A successful completion will have a single value: z
public CompleteReply ( ) : void
return void

Init() public method

Initializes the output
public Init ( Stream srOutput ) : void
srOutput Stream Output stream
return void

PrintLenString() public method

Prints a string to the stream, encoded as UTF-8 with preceeding length
public PrintLenString ( string strValue ) : void
strValue string the string to print
return void

PrintString() public method

Prints a string to the stream, encoded as UTF-8
public PrintString ( String strValue ) : void
strValue String the string to print
return void

PrintString() public method

Prints a char array to the stream, encoded as UTF-8
public PrintString ( char arrData, int intOffset, int intLength ) : void
arrData char the char data to print
intOffset int data offset
intLength int data length
return void

PrintString() public method

Prints a string to the stream, encoded as UTF-8
public PrintString ( string strValue, int intOffset, int intLength ) : void
strValue string the string to print
intOffset int data offset
intLength int data length
return void

RemoveRef() public method

Removes a reference
public RemoveRef ( object objReference ) : bool
objReference object Object reference to remove
return bool

ReplaceRef() public method

Replaces a reference from one object to another
public ReplaceRef ( object objOldReference, object objNewReference ) : bool
objOldReference object Old object reference
objNewReference object New object reference
return bool

StartCall() public method

Starts the method call. Clients would use startCall instead of call if they wanted finer control over writing the arguments, or needed to write headers. c major minor m b16 b8 method-name
public StartCall ( string strMethod ) : void
strMethod string method the method name to call.
return void

StartReply() public method

Starts the reply. A successful completion will have a single value: r
public StartReply ( ) : void
return void

WriteBoolean() public method

Writes a boolean value to the stream. The boolean will be written with the following syntax: T F
public WriteBoolean ( bool blnValue ) : void
blnValue bool the boolean value to write.
return void

WriteByteBufferEnd() public method

Writes the last chunk of a byte buffer to the stream b b16 b18 bytes
public WriteByteBufferEnd ( byte arrBuffer, int intOffset, int intLength ) : void
arrBuffer byte Array with bytes to write
intOffset int Vslue offset
intLength int Value length
return void

WriteByteBufferPart() public method

Writes a part of the byte buffer to the stream b b16 b18 bytes
public WriteByteBufferPart ( byte arrBuffer, int intOffset, int intLength ) : void
arrBuffer byte Array with bytes to write
intOffset int Vslue offset
intLength int Value length
return void

WriteBytes() public method

Writes a byte array to the stream. The array will be written with the following syntax: B b16 b18 bytes
public WriteBytes ( byte arrBuffer ) : void
arrBuffer byte the string value to write
return void

WriteBytes() public method

Writes a byte array to the stream. The array will be written with the following syntax: B b16 b18 bytes
public WriteBytes ( byte arrBuffer, int intOffset, int intLength ) : void
arrBuffer byte the array with the data to write
intOffset int data offset
intLength int data length
return void

WriteDouble() public method

Writes a double value to the stream. The double will be written with the following syntax: D b64 b56 b48 b40 b32 b24 b16 b8
public WriteDouble ( double dblValue ) : void
dblValue double the double value to write
return void

WriteFault() public method

Writes a fault. The fault will be written as a descriptive string followed by an object: f <string>code <string>the fault code <string>message <string>the fault mesage <string>detail mt\x00\xnnException ... z z
public WriteFault ( string strCode, string strMessage, object objDetail ) : void
strCode string code the fault code
strMessage string fault message
objDetail object fault detail
return void

WriteHeader() public method

Writes a header name. The header value must immediately follow. H b16 b8 foo values
public WriteHeader ( string strHeaderName ) : void
strHeaderName string Header name
return void

WriteInt() public method

Writes an integer value to the stream. The integer will be written with the following syntax: I b32 b24 b16 b8
public WriteInt ( int intValue ) : void
intValue int the integer value to write.
return void

WriteListBegin() public method

Writes the list header to the stream. List writers will call writeListBegin followed by the list contents and then call writeListEnd. V t b16 b8 type l b32 b24 b16 b8
public WriteListBegin ( int intLength, string strType ) : void
intLength int
strType string
return void

WriteListEnd() public method

Writes the tail of the list to the stream.
public WriteListEnd ( ) : void
return void

WriteLong() public method

Writes a long value to the stream. The long will be written with the following syntax: L b64 b56 b48 b40 b32 b24 b16 b8
public WriteLong ( long lngValue ) : void
lngValue long the long value to write.
return void

WriteMapBegin() public method

Writes the map header to the stream. Map writers will call writeMapBegin followed by the map contents and then call writeMapEnd. Mt b16 b8 (<key> <value>)z
public WriteMapBegin ( string strType ) : void
strType string Map - Type
return void

WriteMapEnd() public method

Writes the tail of the map to the stream.
public WriteMapEnd ( ) : void
return void

WriteNull() public method

Writes a null value to the stream. The null will be written with the following syntax N
public WriteNull ( ) : void
return void

WriteObject() public method

Writes any object to the output stream.
public WriteObject ( object obj ) : void
obj object object to write
return void

WriteRef() public method

Writes a reference R b32 b24 b16 b8
public WriteRef ( int intValue ) : void
intValue int he integer value to write
return void

WriteRemote() public method

Writes a remote object reference to the stream. The type is the type of the remote interface. 'r' 't' b16 b8 type url
public WriteRemote ( string strType, string strUrl ) : void
strType string Type of the remote instance
strUrl string Url of the remote instance
return void

WriteString() public method

Writes a string value to the stream using UTF-8 encoding. The string will be written with the following syntax: S b16 b8 string-value
public WriteString ( char arrBuffer, int intOffset, int intLength ) : void
arrBuffer char char buffer with data for writing
intOffset int length of chars, that have to be written
intLength int offset for writing
return void

WriteString() public method

Writes a string value to the stream using UTF-8 encoding. The string will be written with the following syntax: S b16 b8 string-value
public WriteString ( string strValue ) : void
strValue string the string value to write.
return void

WriteUTCDate() public method

Writes a date to the stream. d b64 b56 b48 b40 b32 b24 b16 b8
public WriteUTCDate ( long lngTime ) : void
lngTime long the date in milliseconds from the epoch in UTC
return void

Property Details

m_srOutput protected_oe property

the output stream
protected Stream m_srOutput
return Stream