Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Private Attributes
encodings.utf_32_le.IncrementalDecoder Class Reference
Inheritance diagram for encodings.utf_32_le.IncrementalDecoder:
Inheritance graph
[legend]
Collaboration diagram for encodings.utf_32_le.IncrementalDecoder:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def decode
def reset
def getstate
def setstate

Public Attributes

 buffer
 errors
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Static Private Attributes

 _buffer_decode = codecs.utf_32_le_decode

Detailed Description

Definition at line 17 of file utf_32_le.py.


Member Function Documentation

def codecs.BufferedIncrementalDecoder.decode (   self,
  input,
  final = False 
) [inherited]
Decode input and returns the resulting object.

Reimplemented from codecs.IncrementalDecoder.

Definition at line 297 of file codecs.py.

00297 
00298     def decode(self, input, final=False):
00299         # decode input (taking the buffer into account)
00300         data = self.buffer + input
00301         (result, consumed) = self._buffer_decode(data, self.errors, final)
00302         # keep undecoded input until the next call
00303         self.buffer = data[consumed:]
00304         return result

Here is the call graph for this function:

Here is the caller graph for this function:

def codecs.BufferedIncrementalDecoder.getstate (   self) [inherited]
Return the current state of the decoder.

This must be a (buffered_input, additional_state_info) tuple.
buffered_input must be a bytes object containing bytes that
were passed to decode() that have not yet been converted.
additional_state_info must be a non-negative integer
representing the state of the decoder WITHOUT yet having
processed the contents of buffered_input.  In the initial state
and after reset(), getstate() must return (b"", 0).

Reimplemented from codecs.IncrementalDecoder.

Reimplemented in encodings.utf_16.IncrementalDecoder, encodings.utf_8_sig.IncrementalDecoder, and encodings.utf_32.IncrementalDecoder.

Definition at line 309 of file codecs.py.

00309 
00310     def getstate(self):
00311         # additional state info is always 0
00312         return (self.buffer, 0)

Here is the caller graph for this function:

def codecs.BufferedIncrementalDecoder.reset (   self) [inherited]
Reset the decoder to the initial state.

Reimplemented from codecs.IncrementalDecoder.

Reimplemented in encodings.utf_16.IncrementalDecoder, encodings.utf_8_sig.IncrementalDecoder, and encodings.utf_32.IncrementalDecoder.

Definition at line 305 of file codecs.py.

00305 
00306     def reset(self):
00307         IncrementalDecoder.reset(self)
00308         self.buffer = b""

Here is the caller graph for this function:

def codecs.BufferedIncrementalDecoder.setstate (   self,
  state 
) [inherited]
Set the current state of the decoder.

state must have been returned by getstate().  The effect of
setstate((b"", 0)) must be equivalent to reset().

Reimplemented from codecs.IncrementalDecoder.

Reimplemented in encodings.utf_16.IncrementalDecoder, encodings.utf_32.IncrementalDecoder, and encodings.utf_8_sig.IncrementalDecoder.

Definition at line 313 of file codecs.py.

00313 
00314     def setstate(self, state):
00315         # ignore additional state info
00316         self.buffer = state[0]
00317 
00318 #
00319 # The StreamWriter and StreamReader class provide generic working
00320 # interfaces which can be used to implement new encoding submodules
00321 # very easily. See encodings/utf_8.py for an example on how this is
00322 # done.
00323 #

Here is the caller graph for this function:


Member Data Documentation

Definition at line 18 of file utf_32_le.py.

Definition at line 290 of file codecs.py.

Create a IncrementalDecoder instance.

The IncrementalDecoder may use different error handling schemes by
providing the errors keyword argument. See the module docstring
for a list of possible values.

Reimplemented in encodings.bz2_codec.IncrementalDecoder, encodings.zlib_codec.IncrementalDecoder, encodings.base64_codec.IncrementalDecoder, and encodings.hex_codec.IncrementalDecoder.

Definition at line 246 of file codecs.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.


The documentation for this class was generated from the following file: