Packagecom.kaazing.gateway.client.html5
Classpublic class Charset

Charset provides character set encoding and decoding for JavaScript.



Public Properties
 PropertyDefined by
  UTF8 : Charset
[static][read-only] The UTF8 character set encoder and decoder.
Charset
Public Methods
 MethodDefined by
  
decode(buf:ByteBuffer):String
Decodes a ByteBuffer into a String.
Charset
  
encode(str:String, buf:ByteBuffer):void
Encodes a String into a ByteBuffer.
Charset
Property detail
UTF8property
UTF8:Charset  [read-only]

The UTF8 character set encoder and decoder.

Implementation
    public static function get UTF8():Charset
Method detail
decode()method
public function decode(buf:ByteBuffer):String

Decodes a ByteBuffer into a String. Bytes for partial characters remain in the ByteBuffer after decode has completed.

Parameters
buf:ByteBuffer — buf the ByteBuffer to decode

Returns
String
encode()method 
public function encode(str:String, buf:ByteBuffer):void

Encodes a String into a ByteBuffer.

Parameters
str:String — text the String to encode
 
buf:ByteBuffer — buf the target ByteBuffer