62
edits
Changes
→Class: Converter
; [Constructor] Converter(from, to)
: Where from and to are the encoding names.
; [Method] pushwrite(byteStringOrArray)
: Convert input from a ByteString or ByteArray. The results are stored in an internal buffer, and also those parts of byteStringOrArray that could not be converted (for multi-byte encodings, in a separate buffer).
: Returns nothing.
; [Method] getread([byteArray,] [maximumSize])
: Read maximumSize bytes or as many bytes as available out of the internal buffer. If byteArray is specified, the data is written into that ByteArray.
: Returns a ByteString if byteArray is not specified, or byteArray itself otherwise.
: Returns nothing and takes no parameters.
'''TODO': Which exceptions exception to throw on error?
Example usage: