| java.lang.Object java.io.Reader com.caucho.vfs.i18n.EncodingReader
All known Subclasses: com.caucho.vfs.i18n.ISO8859_1Reader, com.caucho.vfs.i18n.WindowsHackReader, com.caucho.vfs.i18n.UTF16Reader, com.caucho.vfs.i18n.JDKReader, com.caucho.vfs.i18n.JAVAReader, com.caucho.vfs.i18n.UTF8Reader, com.caucho.vfs.i18n.UTF16_REVReader,
EncodingReader | abstract public class EncodingReader extends Reader (Code) | | Abstract class for a byte-to-character encoding reader and its
associated factory.
Implementations need to implement create
and read() at minimum. Efficient implementations will
also implement the read into a buffer.
Implementations should not buffer the bytes.
|
Method Summary | |
public void | close() Closes the reader, possibly returning it to a pool. | abstract public Reader | create(InputStream is, String javaEncoding) Returns a new encoding reader for the given stream and javaEncoding.
Parameters: is - the input stream providing the bytes. Parameters: javaEncoding - the JDK name for the encoding. | public Reader | create(InputStream is) Returns a new encoding reader for the given stream and javaEncoding.
Parameters: is - the input stream providing the bytes. Parameters: javaEncoding - the JDK name for the encoding. | public String | getJavaEncoding() | abstract public int | read() Returns the next character using the correct encoding. | public int | read(char[] cbuf, int off, int len) Reads into a character buffer using the correct encoding.
Parameters: cbuf - character buffer receiving the data. Parameters: off - starting offset into the buffer. Parameters: len - number of characters to read. | public void | setJavaEncoding(String encoding) |
close | public void close()(Code) | | Closes the reader, possibly returning it to a pool.
|
create | abstract public Reader create(InputStream is, String javaEncoding) throws UnsupportedEncodingException(Code) | | Returns a new encoding reader for the given stream and javaEncoding.
Parameters: is - the input stream providing the bytes. Parameters: javaEncoding - the JDK name for the encoding. an encoding reader or null for ISO-8859-1. |
create | public Reader create(InputStream is) throws UnsupportedEncodingException(Code) | | Returns a new encoding reader for the given stream and javaEncoding.
Parameters: is - the input stream providing the bytes. Parameters: javaEncoding - the JDK name for the encoding. an encoding reader or null for ISO-8859-1. |
read | abstract public int read() throws IOException(Code) | | Returns the next character using the correct encoding.
the next character or -1 on end of file. |
read | public int read(char[] cbuf, int off, int len) throws IOException(Code) | | Reads into a character buffer using the correct encoding.
Parameters: cbuf - character buffer receiving the data. Parameters: off - starting offset into the buffer. Parameters: len - number of characters to read. the number of characters read or -1 on end of file. |
setJavaEncoding | public void setJavaEncoding(String encoding)(Code) | | |
|
|