C# Class DotAmf.Decoder.Amf0Decoder

AMF0 decoder.
Inheritance: AbstractAmfDecoder
Mostra file Open project: artema/DotAmf

Public Methods

Method Description
Amf0Decoder ( AmfEncodingOptions options ) : System
Decode ( Stream stream, XmlWriter output ) : void
ReadPacketBody ( Stream stream ) : AmfMessageDescriptor
ReadPacketHeader ( Stream stream ) : AmfHeaderDescriptor

Protected Methods

Method Description
ReadAmfValue ( AmfContext context, AmfStreamReader reader, XmlWriter output = null ) : void

Private Methods

Method Description
ReadDate ( AmfStreamReader reader, XmlWriter output = null ) : void

Read a date.

Type declaration: time-zone = S16 date-type = date-marker DOUBLE time-zone

ReadEcmaArray ( AmfContext context, AmfStreamReader reader, XmlWriter output = null ) : void

Read an ECMA array.

Type declaration: associative-count = U32 ecma-array-type = associative-count *(object-property)

ReadLongString ( AmfStreamReader reader, XmlWriter output = null ) : string

Read a long string.

Type declaration: long-string-type = long-string-marker UTF-8-long

ReadObject ( AmfContext context, AmfStreamReader reader, XmlWriter output = null, bool isTyped = false ) : void

Read an object.

Type declaration: object-property = (UTF-8 value-type) | (UTF-8-empty object-end-marker) anonymous-object-type = object-marker *(object-property)

ReadPropertiesMap ( AmfContext context, AmfStreamReader reader, XmlWriter output = null ) : IList

Read object properties map.

Type declaration: object-property = (UTF-8 value-type) | (UTF-8-empty object-end-marker)

ReadReference ( AmfContext context, AmfStreamReader reader, XmlWriter output = null ) : void

Read an object reference.

Type declaration: reference-type = reference-marker U16

ReadStrictArray ( AmfContext context, AmfStreamReader reader, XmlWriter output = null ) : void

Read a strict array.

Type declaration: array-count = U32 strict-array-type = array-count *(value-type)

ReadString ( AmfStreamReader reader, XmlWriter output = null ) : string

Read a string.

Type declaration: string-type = string-marker UTF-8

ReadUtf8 ( AmfStreamReader reader, uint length ) : string

Read a specified number of bytes of a string.

ReadValue ( AmfContext context, AmfStreamReader reader, Amf0TypeMarker type, XmlWriter output = null ) : void

Read a value of a given type from current reader's position.

Current reader position must be just after a value type marker of a type to read.

ReadXml ( AmfStreamReader reader, XmlWriter output = null ) : void

Read an XML document.

Type declaration: xml-document-type = xml-document-marker UTF-8-long

WriteReference ( int index, XmlWriter output ) : void

Write a reference.

Method Details

Amf0Decoder() public method

public Amf0Decoder ( AmfEncodingOptions options ) : System
options DotAmf.Data.AmfEncodingOptions
return System

Decode() public method

public Decode ( Stream stream, XmlWriter output ) : void
stream Stream
output System.Xml.XmlWriter
return void

ReadAmfValue() protected method

protected ReadAmfValue ( AmfContext context, AmfStreamReader reader, XmlWriter output = null ) : void
context DotAmf.Data.AmfContext
reader DotAmf.IO.AmfStreamReader
output System.Xml.XmlWriter
return void

ReadPacketBody() public final method

public final ReadPacketBody ( Stream stream ) : AmfMessageDescriptor
stream Stream
return DotAmf.Data.AmfMessageDescriptor

ReadPacketHeader() public final method

public final ReadPacketHeader ( Stream stream ) : AmfHeaderDescriptor
stream Stream
return DotAmf.Data.AmfHeaderDescriptor