Package twisted :: Package protocols :: Module dns :: Class IEncodable |
[show private | hide private]
[frames | no frames]

## Class IEncodable

Interface for something which can be encoded to and decoded from a file object.

Method Summary
| ``decode`(self, strio, length)` Reconstruct an object from data read from the given file object.
| ``encode`(self, strio, compDict)` Write a representation of this object to the given file object.

Method Details

### decode(self, strio, length=None) Reconstruct an object from data read from the given file object. Parameters: `strio` - The stream from which bytes may be read (type=File-like object) `length` - The number of bytes in this RDATA field. Most implementations can ignore this value. Only in the case of records similar to TXT where the total length is in no way encoded in the data is it necessary. (type=`int` or `None`)

### encode(self, strio, compDict=None) Write a representation of this object to the given file object. Parameters: `strio` - The stream to which to write bytes (type=File-like object) `compDict` - A dictionary of backreference addresses that have have already been written to this stream and that may be used for compression. (type=`dict` or `None`)

Generated by Epydoc 1.1 on Thu May 8 13:16:36 2003 | http://epydoc.sf.net