C# Класс hessiancsharp.io.CHessianOutput

Output stream for Hessian requests

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

Наследование: AbstractHessianOutput
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
m_srOutput Stream

Открытые методы

Метод Описание
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

Описание методов

AddRef() публичный Метод

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
Результат bool

CHessianOutput() публичный Метод

Constructor
public CHessianOutput ( Stream srOutput ) : System
srOutput Stream Output stream
Результат System

Call() публичный Метод

Writes a complete method call.
public Call ( string strMethod, object args ) : void
strMethod string Method name
args object Method args
Результат void

CompleteCall() публичный Метод

Completes call z
public CompleteCall ( ) : void
Результат void

CompleteReply() публичный Метод

Completes reading the reply. A successful completion will have a single value: z
public CompleteReply ( ) : void
Результат void

Init() публичный Метод

Initializes the output
public Init ( Stream srOutput ) : void
srOutput Stream Output stream
Результат void

PrintLenString() публичный Метод

Prints a string to the stream, encoded as UTF-8 with preceeding length
public PrintLenString ( string strValue ) : void
strValue string the string to print
Результат void

PrintString() публичный Метод

Prints a string to the stream, encoded as UTF-8
public PrintString ( String strValue ) : void
strValue String the string to print
Результат void

PrintString() публичный Метод

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
Результат void

PrintString() публичный Метод

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
Результат void

RemoveRef() публичный Метод

Removes a reference
public RemoveRef ( object objReference ) : bool
objReference object Object reference to remove
Результат bool

ReplaceRef() публичный Метод

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
Результат bool

StartCall() публичный Метод

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.
Результат void

StartReply() публичный Метод

Starts the reply. A successful completion will have a single value: r
public StartReply ( ) : void
Результат void

WriteBoolean() публичный Метод

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.
Результат void

WriteByteBufferEnd() публичный Метод

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
Результат void

WriteByteBufferPart() публичный Метод

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
Результат void

WriteBytes() публичный Метод

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
Результат void

WriteBytes() публичный Метод

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
Результат void

WriteDouble() публичный Метод

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
Результат void

WriteFault() публичный Метод

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
Результат void

WriteHeader() публичный Метод

Writes a header name. The header value must immediately follow. H b16 b8 foo values
public WriteHeader ( string strHeaderName ) : void
strHeaderName string Header name
Результат void

WriteInt() публичный Метод

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.
Результат void

WriteListBegin() публичный Метод

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
Результат void

WriteListEnd() публичный Метод

Writes the tail of the list to the stream.
public WriteListEnd ( ) : void
Результат void

WriteLong() публичный Метод

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.
Результат void

WriteMapBegin() публичный Метод

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
Результат void

WriteMapEnd() публичный Метод

Writes the tail of the map to the stream.
public WriteMapEnd ( ) : void
Результат void

WriteNull() публичный Метод

Writes a null value to the stream. The null will be written with the following syntax N
public WriteNull ( ) : void
Результат void

WriteObject() публичный Метод

Writes any object to the output stream.
public WriteObject ( object obj ) : void
obj object object to write
Результат void

WriteRef() публичный Метод

Writes a reference R b32 b24 b16 b8
public WriteRef ( int intValue ) : void
intValue int he integer value to write
Результат void

WriteRemote() публичный Метод

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
Результат void

WriteString() публичный Метод

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
Результат void

WriteString() публичный Метод

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.
Результат void

WriteUTCDate() публичный Метод

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
Результат void

Описание свойств

m_srOutput защищенное свойство

the output stream
protected Stream m_srOutput
Результат Stream