pype32.utils.WriteData

Package pype32 :: Module utils :: Class WriteData |
[hide private]
[frames] | no frames]

# Class WriteData

source code

    object --+
             |
            WriteData

Return a WriteData-like stream object for writing.

Instance Methods | [hide private]
__init__(self, data, endianness=`'``<``'`, signed=False) x.__init__(...) initializes x; see help(type(x)) for signature | source code
__len__(self) | source code
__str__(self) str(x) | source code
writeByte(self, byte) Writes a byte into the WriteData stream object. | source code
writeWord(self, word) Writes a word value into the WriteData stream object. | source code
writeDword(self, dword) Writes a dword value into the WriteData stream object. | source code
writeQword(self, qword) Writes a qword value into the WriteData stream object. | source code
write(self, dataToWrite) Writes data into the WriteData stream object. | source code
setOffset(self, value) Sets the offset of the WriteData stream object in wich the data is written. | source code
skipBytes(self, nroBytes) Skips the specified number as parameter to the current value of the WriteData stream. | source code
int |
tell(self) Returns the current position of the offset in the WriteData sream object. | source code
__del__(self) | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, data, endianness=`'``<``'`, signed=False) (Constructor) | source code
x.__init__(...) initializes x; see help(type(x)) for signature Parameters: `data` (str) - Data to create the WriteData object. `endianness` (str) - (Optional) Indicates the endianness used to write the data. The `<` indicates little-endian while `>` indicates big-endian. `signed` (bool) - (Optional) If set to `True` the data will be treated as signed. If set to `False` it will be treated as unsigned. Overrides: object.__init__

### __str__(self) (Informal representation operator) | source code
str(x) Overrides: object.__str__ (inherited documentation)

### writeByte(self, byte) | source code
Writes a byte into the WriteData stream object. Parameters: `byte` (int) - Byte value to write into the stream.

### writeWord(self, word) | source code
Writes a word value into the WriteData stream object. Parameters: `word` (int) - Word value to write into the stream.

### writeDword(self, dword) | source code
Writes a dword value into the WriteData stream object. Parameters: `dword` (int) - Dword value to write into the stream.

### writeQword(self, qword) | source code
Writes a qword value into the WriteData stream object. Parameters: `qword` (int) - Qword value to write into the stream.

### write(self, dataToWrite) | source code
Writes data into the WriteData stream object. Parameters: `dataToWrite` (str) - Data to write into the stream.

### setOffset(self, value) | source code
Sets the offset of the WriteData stream object in wich the data is written. Parameters: `value` (int) - Integer value that represent the offset we want to start writing in the WriteData stream. Raises: `WrongOffsetValueException` - The value is beyond the total length of the data.

### skipBytes(self, nroBytes) | source code
Skips the specified number as parameter to the current value of the WriteData stream. Parameters: `nroBytes` (int) - The number of bytes to skip.

### tell(self) | source code
Returns the current position of the offset in the WriteData sream object. Returns: int The value of the current offset in the stream.