| java.lang.Object java.io.Reader com.sun.ukit.jaxp.ReaderUTF8
ReaderUTF8 | public class ReaderUTF8 extends Reader (Code) | | UTF-8 transformed UCS-2 character stream reader.
This reader converts UTF-8 transformed UCS-2 characters to Java characters.
The UCS-2 subset of UTF-8 transformation is described in RFC-2279 #2
"UTF-8 definition":
0000 0000-0000 007F 0xxxxxxx
0000 0080-0000 07FF 110xxxxx 10xxxxxx
0000 0800-0000 FFFF 1110xxxx 10xxxxxx 10xxxxxx
This reader will return incorrect last character on broken UTF-8 stream.
|
Method Summary | |
public void | close() Closes the stream. | public int | read(char[] cbuf, int off, int len) Reads characters into a portion of an array. | public int | read() Reads a single character. |
ReaderUTF8 | public ReaderUTF8(InputStream is)(Code) | | Constructor.
Parameters: is - A byte input stream. |
read | public int read(char[] cbuf, int off, int len) throws IOException(Code) | | Reads characters into a portion of an array.
Parameters: cbuf - Destination buffer. Parameters: off - Offset at which to start storing characters. Parameters: len - Maximum number of characters to read. exception: IOException - If any IO errors occur. exception: UnsupportedEncodingException - If UCS-4 character occur in the stream. |
read | public int read() throws IOException(Code) | | Reads a single character.
The character read, as an integer in the range 0 to 65535 (0x00-0xffff), or -1 if the end of the stream has been reached. exception: IOException - If any IO errors occur. exception: UnsupportedEncodingException - If UCS-4 character occur in the stream. |
|
|