Package pyamf :: Class BaseDecoder

[hide private]
[frames] | no frames]

# Class BaseDecoder

source code

Base AMF decoder.

Instance Methods | [hide private]

__init__(self, data=None, context=None, strict=False) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code

readType(self) | source code

readElement(self) Reads an AMF3 element from the data stream. | source code

__iter__(self) | source code

Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Instance Variables | [hide private]

An instance of `BaseDecoder.context_class` | context_class The context for the decoding.
`list` | type_map = ``{``}``
BufferedByteStream | stream The underlying data stream.
`bool` | strict Defines how strict the decoding should be.

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, data=None, context=None, strict=False)
(Constructor)

source code

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  - `data` (BufferedByteStream) - Data stream.
  - `context` (Context) - Context.
Raises:
  - `TypeError` - The `context` parameter must be of type Context.
Overrides: object.__init__

### readType(self)

source code

Raises:
  - `NotImplementedError` - Override in a subclass.

### readElement(self)

source code

Reads an AMF3 element from the data stream.

Raises:
  - `DecodeError` - The ActionScript type is unsupported.
  - `EOStream` - No more data left to decode.

### __iter__(self)

source code

Raises:
  - `StopIteration`

Instance Variable Details | [hide private]

### context_class

The context for the decoding.

Type:
  An instance of `BaseDecoder.context_class`

Value:
  pyamf.BaseContext

### strict

Defines how strict the decoding should be. For the time being this relates to typed objects in the stream that do not have a registered alias. Introduced in 0.4.

Type:
  `bool`