public class JSEncoder extends Encoder
Encoder.FixedCharArrayWriter
Modifier and Type | Field and Description |
---|---|
protected static char[] |
CARRIAGE_RETURN |
protected static Encoder |
encoder |
protected static char[] |
GREATER_THAN |
protected static char[] |
LESS_THAN |
protected static char[] |
LINE_FEED |
protected static char[] |
UNICODE |
Constructor and Description |
---|
JSEncoder() |
Modifier and Type | Method and Description |
---|---|
int |
decode(char[] src,
int soff,
int len,
Writer dst)
Decodes from JavaScript.
|
int |
encode(char[] src,
int soff,
int len,
Writer dst)
Encodes to JavaScript.
|
static Encoder |
encoder()
Returns the encoder instance.
|
protected static final char[] LINE_FEED
protected static final char[] CARRIAGE_RETURN
protected static final char[] LESS_THAN
protected static final char[] GREATER_THAN
protected static final char[] UNICODE
protected static Encoder encoder
public static Encoder encoder()
public int encode(char[] src, int soff, int len, Writer dst) throws IOException
encode
in class Encoder
src
- Char array to encode.soff
- Offset in the src array at which to begin reading.len
- Length of src array to encode.dst
- Writer in which to write the encoded chars.IOException
public int decode(char[] src, int soff, int len, Writer dst) throws IOException
decode
in class Encoder
src
- Char array to decode.soff
- Offset in the src array at which to begin reading.len
- Length of src array to decode.dst
- Writer in which to write the decoded chars.IOException