Changes

Jump to: navigation, search

ServerJS/Encodings

279 bytes added, 22:07, 9 April 2009
Class: Converter: add close() method
: 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.
; [Method] close()
: Close the stream. Throws an exception if there was a conversion error (specifically, a partial multibyte character).
: Returns nothing and takes no parameters.
 
'''TODO': Which exceptions to throw on error?
Example usage:
Converter = require('encodings').Converter
converter = new Converter('iso-8859-1', 'utf-32')
converter.push(input)// input is a ByteString output = converter.get()// output is a ByteString
62
edits

Navigation menu