Package pyamf :: Package util :: Class DataTypeMixIn
[hide private]
[frames] | no frames]

Class DataTypeMixIn

source code


Provides methods for reading and writing basic data types for file-like objects.

Instance Methods [hide private]
 
_read(self, length)
Reads length bytes from the stream.
source code
 
read_uchar(self)
Reads an unsigned char from the stream.
source code
 
write_uchar(self, c)
Writes an unsigned char to the stream.
source code
 
read_char(self)
Reads a char from the stream.
source code
 
write_char(self, c)
Write a char to the stream.
source code
 
read_ushort(self)
Reads a 2 byte unsigned integer from the stream.
source code
 
write_ushort(self, s)
Writes a 2 byte unsigned integer to the stream.
source code
 
read_short(self)
Reads a 2 byte integer from the stream.
source code
 
write_short(self, s)
Writes a 2 byte integer to the stream.
source code
 
read_ulong(self)
Reads a 4 byte unsigned integer from the stream.
source code
 
write_ulong(self, l)
Writes a 4 byte unsigned integer to the stream.
source code
 
read_long(self)
Reads a 4 byte integer from the stream.
source code
 
write_long(self, l)
Writes a 4 byte integer to the stream.
source code
 
read_float(self)
Reads a 4 byte float from the stream.
source code
 
write_float(self, f)
Writes a 4 byte float to the stream.
source code
unicode
read_utf8_string(self, length)
Reads a UTF-8 string from the stream.
source code
 
write_utf8_string(self, u)
Writes a unicode object to the stream in UTF-8
source code
 
read_double(self)
Reads an 8 byte float from the stream.
source code
 
write_double(self, d)
Writes an 8 byte float to the stream.
source code

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

Class Variables [hide private]
  ENDIAN_NETWORK = '!'
  ENDIAN_NATIVE = '@'
  ENDIAN_LITTLE = '<'
  ENDIAN_BIG = '>'
  endian = '!'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_read(self, length)

source code 

Reads length bytes from the stream. If an attempt to read past the end of the buffer is made, EOFError is raised.