Package legume :: Module bytebuffer :: Class ByteBuffer
[frames] | no frames]

Class ByteBuffer

object --+
         |
        ByteBuffer


Provides a simplified method of reading struct packed data from
a string buffer.

read_bytes and read_struct remove the read data from the string buffer.

Instance Methods
 
__init__(self, bytes)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
read_bytes(self, bytes_to_read)
 
peek_bytes(self, bytes_to_peek)
 
push_bytes(self, bytes)
 
read_struct(self, struct_format)
 
peek_struct(self, struct_format)
 
is_empty(self)

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

Properties
  length

Inherited from object: __class__

Method Details

__init__(self, bytes)
(Constructor)

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

Overrides: object.__init__
(inherited documentation)

Property Details

length

Get Method:
unreachable.length(self)