# ``twisted`.`names`.`dns`.`Charstr``

class documentation

`class Charstr: (source)`

Implements interfaces: `twisted.names.dns.IEncodable`

View In Hierarchy

Undocumented

Method | `__eq__` | Undocumented
Method | `__hash__` | Undocumented
Method | `__init__` | Undocumented
Method | `__str__` | Represent this `Charstr` instance by its string value.
Method | `decode` | Decode a byte string into this Charstr.
Method | `encode` | Encode this Character string into the appropriate byte format.
Instance Variable | `string` | Undocumented

def __eq__(self, other): (source)

Undocumented

Parameters
other:`object` | Undocumented
Returns
`bool` | Undocumented

def __hash__(self): (source)

Undocumented

def __init__(self, string=b''): (source)

Undocumented

def __str__(self): (source)
Represent this `Charstr` instance by its string value.

Returns
`str` | Undocumented

def decode(self, strio, length=None): (source)
from `twisted.names.dns.IEncodable`
Decode a byte string into this Charstr.

Parameters
strio:file | Bytes will be read from this file until the full string is decoded.
length | Undocumented
Raises
`EOFError` | Raised when there are not enough bytes available from `strio`.

def encode(self, strio, compDict=None): (source)
from `twisted.names.dns.IEncodable`
Encode this Character string into the appropriate byte format.

Parameters
strio:file | The byte representation of this Charstr will be written to this file.
compDict | Undocumented

string = (source)

Undocumented