Package cpyamf :: Module util :: Class BufferedByteStream
[hide private]
[frames] | no frames]

Class BufferedByteStream


A Python exposed version of cBufferedByteStream. This exists because of various intricacies of Cythons cpdef (probably just user stupidity tho)

Instance Methods [hide private]
 
__add__(x, y)
x+y
 
__init__(...)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__len__(x)
len(x)
a new object with type S, a subtype of T
__new__(T, S, ...)
 
__radd__(x, y)
y+x
 
__str__(x)
str(x)
 
flush(...)
 
peek(...)
Looks size bytes ahead in the stream, returning what it finds, returning the stream pointer to its initial position.
 
read(...)
Reads size bytes from the stream.
 
read_double(...)
Reads an 8 byte float from the stream.
 
read_float(...)
Reads a 4 byte float from the stream.
 
write(...)
Writes the content of the specified x into this buffer.
 
write_char(...)
Write a char to the stream.
 
write_double(...)
Writes an 8 byte float to the stream.
 
write_short(...)
Writes a 2 byte integer to the stream.
 
write_ulong(...)
Writes a 4 byte unsigned integer to the stream.
 
write_ushort(...)
Writes a 2 byte unsigned integer to the stream.

Inherited from cBufferedByteStream: __nonzero__, append, at_eof, consume, getvalue, read_24bit_int, read_24bit_uint, read_char, read_long, read_short, read_uchar, read_ulong, read_ushort, read_utf8_string, remaining, seek, tell, truncate, write_24bit_int, write_24bit_uint, write_float, write_long, write_uchar, write_utf8_string

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
  endian

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

__str__(x)
(Informal representation operator)

 

str(x)

Overrides: object.__str__

peek(...)

 

Looks size bytes ahead in the stream, returning what it finds, returning the stream pointer to its initial position.

Parameters:
  • size (int) - Default is 1.
Returns:
Bytes.

write(...)

 

Writes the content of the specified x into this buffer.

Parameters:
  • x ()

write_char(...)

 

Write a char to the stream.

Parameters:
  • x (int) - char
Raises:
  • TypeError - Unexpected type for int x.
Overrides: cBufferedByteStream.write_char

write_double(...)

 

Writes an 8 byte float to the stream.

Parameters:
  • val (float) - 8 byte float
Raises:
  • TypeError - Unexpected type for float val.
Overrides: cBufferedByteStream.write_double

write_short(...)

 

Writes a 2 byte integer to the stream.

Parameters:
  • x (int) - 2 byte integer
Raises:
  • TypeError - Unexpected type for int x.
Overrides: cBufferedByteStream.write_short

write_ulong(...)

 

Writes a 4 byte unsigned integer to the stream.

Parameters:
  • x (int) - 4 byte unsigned integer
Raises:
  • TypeError - Unexpected type for int x.
Overrides: cBufferedByteStream.write_ulong

write_ushort(...)

 

Writes a 2 byte unsigned integer to the stream.

Parameters:
  • x (int) - 2 byte unsigned integer
Raises:
  • TypeError - Unexpected type for int x.
Overrides: cBufferedByteStream.write_ushort