62
edits
Changes
→Alternative: Converter: add outputByteArray parameter for further efficiency
; [Constructor] Converter(from, to)
: Where from and to are the encoding names.
; [Method] push(byteStringOrArray[, outputByteArray]): Convert input from a ByteString or ByteArray. The results are returned, and those Those parts of byteStringOrArray that could not be converted (for multi-byte encodings) are stored in a buffer. If outputByteArray is passed, the results are ''appended'' to outputByteArray.: Returns If outputByteArray was passed, returns outputByteArray, otherwise returns (as a ByteString) as much output as could be converted.
; [Method] close()
: Close the stream. Throws an exception if there was a conversion error (specifically, a partial multibyte character).