com.bluecast.xml
Class UnicodeBigXMLDecoder
java.lang.Object
com.bluecast.xml.UnicodeBigXMLDecoder
- CharsetDecoder, XMLDecoder
public final class UnicodeBigXMLDecoder
extends java.lang.Object
A decoder for big-endian Unicode text. Also converts
carriage returns into linefeeds and CRLF into LF.
- Yuval Oren, yuval@bluecast.com
void | decode(byte[] in_buf, int in_off, int in_len, char[] out_buf, int out_off, int out_len, int[] result) - Decodes an array of bytes into characters.
|
void | decodeXMLDecl(byte[] in_buf, int in_off, int in_len, char[] out_buf, int out_off, int out_len, int[] result) - Decodes the XML declaration from an array of bytes into characters.
|
int | maxBytesPerChar() - Minimum number of characters produced per byte using
this decoder.
|
int | minBytesPerChar() - Minimum number of characters produced per byte using
this decoder.
|
CharsetDecoder | newCharsetDecoder()
|
XMLDecoder | newXMLDecoder()
|
void | reset()
|
decode
public void decode(byte[] in_buf,
int in_off,
int in_len,
char[] out_buf,
int out_off,
int out_len,
int[] result)
throws CharConversionException
Decodes an array of bytes into characters.
- decode in interface CharsetDecoder
in_buf
- input byte bufferin_off
- starting byte buffer offsetin_len
- max number of bytes to readout_buf
- output character bufferout_off
- char buffer offset at which to start writingout_len
- max number of chars to writeresult
- an array of size >= 2 where results are returned:
result[0] = number of bytes read.
result[1] = number of chars written
decodeXMLDecl
public void decodeXMLDecl(byte[] in_buf,
int in_off,
int in_len,
char[] out_buf,
int out_off,
int out_len,
int[] result)
throws CharConversionException
Decodes the XML declaration from an array of bytes into characters.
This method will read at least until a '>' character is found or until a
decoding error occurs. Additional bytes may be decoded, up to a total
of in_len.
- decodeXMLDecl in interface XMLDecoder
in_buf
- input byte bufferin_off
- starting byte buffer offsetin_len
- max number of bytes to readout_buf
- output character bufferout_off
- char buffer offset at which to start writingout_len
- max number of chars to writeresult
- an array of size >= 2 where results are returned:
result[0] = number of bytes read.
result[1] = number of chars written
maxBytesPerChar
public int maxBytesPerChar()
Minimum number of characters produced per byte using
this decoder.
- maxBytesPerChar in interface CharsetDecoder
minBytesPerChar
public int minBytesPerChar()
Minimum number of characters produced per byte using
this decoder.
- minBytesPerChar in interface CharsetDecoder