RingoJS

Module ringo/encoding

Low-level support for character encoding and decoding.

Class Decoder

Instance Methods

Instance Properties

Class Encoder

Instance Methods

Instance Properties


Decoder (charset, strict, capacity)

Parameters

null charset
null strict
null capacity

Decoder.prototype. clear ()


Decoder.prototype. close ()


Decoder.prototype. decode (bytes, start, end)

Decode bytes from the given buffer.

Parameters

binary.Binary bytes

a ByteString or ByteArray

Number start

The start index, or 0 if undefined

Number end

the end index, or bytes.length if undefined


Decoder.prototype. hasPendingInput ()


Decoder.prototype. length


Decoder.prototype. read ()


Decoder.prototype. readFrom (source)

Parameters

binary.Binary source

Decoder.prototype. readLine (includeNewline)

Parameters

Boolean includeNewline

Decoder.prototype. toString ()


Encoder (charset, strict, capacity)

Parameters

null charset
null strict
null capacity

Encoder.prototype. clear ()


Encoder.prototype. close ()


Encoder.prototype. encode (string, start, end)

Parameters

String string
Number start
Number end

Encoder.prototype. length


Encoder.prototype. toByteArray ()


Encoder.prototype. toByteString ()


Encoder.prototype. toString ()


Encoder.prototype. writeTo (sink)

Parameters

null sink