| java.lang.Object java.io.Reader com.caucho.vfs.i18n.EncodingReader com.caucho.vfs.i18n.WindowsHackReader
WindowsHackReader | public class WindowsHackReader extends EncodingReader (Code) | | Implements an encoding reader to convert the stupid
windows "smart" quotes into ISO-8859-1 (Latin-1) characters.
The windows "smart" quotes actually do map into
unicode characters. If that's what you want, use
the window-1521 encoding instead. windows-hack converts
to the closest latin-1 equivalent.
The three exceptions are the elipses '...', the
trademark, and the per-mille characters. Those are translated into
their unicode equivalents because there isn't a useful
latin-1 equivalent.
|
Constructor Summary | |
public | WindowsHackReader() Null-arg constructor for instantiation by com.caucho.vfs.Encoding only. |
Method Summary | |
public Reader | create(InputStream is, String javaEncoding) Create a windows-hack reader based on the readStream.
Parameters: is - the input stream providing the bytes. Parameters: javaEncoding - the JDK name for the encoding. | public int | read() Reads into a character buffer 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. |
WindowsHackReader | public WindowsHackReader()(Code) | | Null-arg constructor for instantiation by com.caucho.vfs.Encoding only.
|
create | public Reader create(InputStream is, String javaEncoding)(Code) | | Create a windows-hack reader based on the readStream.
Parameters: is - the input stream providing the bytes. Parameters: javaEncoding - the JDK name for the encoding. the windows-hack reader. |
read | public int read() throws IOException(Code) | | Reads into a character buffer using the correct encoding.
|
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. |
|
|