Changes

Jump to: navigation, search

ServerJS/Encodings

1 byte added, 22:08, 9 April 2009
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:
62
edits

Navigation menu