Package pyamf :: Module amf0 :: Class Decoder |
[hide private]
[frames] | no frames]

# Class Decoder

source code

Decodes an AMF0 stream.

Nested Classes | [hide private]
An instance of `BaseDecoder.context_class` | context_class The context for the decoding.

Instance Methods | [hide private]
`int` or `float` |
readNumber(self) Reads a ActionScript `Number` value. | source code
`bool` |
readBoolean(self) Reads a ActionScript `Boolean` value. | source code
`None` |
readNull(self) Reads a ActionScript `null` value. | source code
readUndefined(self) Reads an ActionScript `undefined` value. | source code
`dict` |
readMixedArray(self) Read mixed array. | source code
`list` |
readList(self) Read a `list` from the data stream. | source code
readTypedObject(self) Reads an ActionScript object from the stream and attempts to 'cast' it. | source code
`mixed` |
readAMF3(self) Read AMF3 elements from the data stream. | source code
`str` |
readString(self) Reads a string from the data stream. | source code
_readObject(self, obj, alias=None) | source code
ASObject |
readObject(self) Reads an object from the data stream. | source code
readReference(self) Reads a reference from the data stream. | source code
readDate(self) Reads a UTC date from the data stream. | source code
readLongString(self) Read UTF8 string. | source code
readXML(self) Read XML. | source code
Inherited from `BaseDecoder`: `__init__`, `__iter__`, `readElement` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables | [hide private]
`list` | type_map = ``{``'``\x00``'``:` `'``readNumber``'``,` `'``\x01``'``:` `'``readBoolean``'``,` `'``\x02``...``

Instance Variables | [hide private]
Inherited from `BaseDecoder`: `stream`, `strict`, `timezone_offset`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### readNumber(self) | source code
Reads a ActionScript `Number` value. In ActionScript 1 and 2 the `NumberASTypes` type represents all numbers, both floats and integers. Returns: `int` or `float`

### readBoolean(self) | source code
Reads a ActionScript `Boolean` value. Returns: `bool` Boolean.

### readNull(self) | source code
Reads a ActionScript `null` value. Returns: `None` `None`

### readUndefined(self) | source code
Reads an ActionScript `undefined` value. Returns: Undefined

### readMixedArray(self) | source code
Read mixed array. Returns: `dict` `dict` read from the stream

### readList(self) | source code
Read a `list` from the data stream. Returns: `list` `list`

### readTypedObject(self) | source code
Reads an ActionScript object from the stream and attempts to 'cast' it. See Also: load_class

### readAMF3(self) | source code
Read AMF3 elements from the data stream. Returns: `mixed` The AMF3 element read from the stream

### readString(self) | source code
Reads a string from the data stream. Returns: `str` string

### readReference(self) | source code
Reads a reference from the data stream. Raises: `pyamf.ReferenceError` - Unknown reference.

### readDate(self) | source code
Reads a UTC date from the data stream. Client and servers are responsible for applying their own timezones. Date: `0x0B T7 T6` .. `T0 Z1 Z2 T7` to `T0` form a 64 bit Big Endian number that specifies the number of nanoseconds that have passed since 1/1/1970 0:00 to the specified time. This format is UTC 1970. `Z1` and `Z0` for a 16 bit Big Endian number indicating the indicated time's timezone in minutes.

Class Variable Details | [hide private]

  ### type_map Type: `list` Value:
      {'\x00': 'readNumber',
       '\x01': 'readBoolean',
       '\x02': 'readString',
       '\x03': 'readObject',
       '\x05': 'readNull',
       '\x06': 'readUndefined',
       '\x07': 'readReference',
       '\x08': 'readMixedArray',
      ...