com.caucho.vfs.i18n
Class ISO8859_1Reader

java.lang.Object
  extended by java.io.Reader
      extended by com.caucho.vfs.i18n.EncodingReader
          extended by com.caucho.vfs.i18n.ISO8859_1Reader
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable

public class ISO8859_1Reader
extends EncodingReader

Implements an encoding reader for ISO-8859-1


Field Summary
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
ISO8859_1Reader()
          Null-arg constructor for instantiation by com.caucho.vfs.Encoding only.
ISO8859_1Reader(java.io.InputStream is)
          Create an ISO-8859-1 reader based on the readStream.
 
Method Summary
 java.io.Reader create(java.io.InputStream is, java.lang.String javaEncoding)
          Create a ISO-8859-1 reader based on the readStream.
 int read()
          Reads the next character.
 int read(char[] buf, int offset, int length)
          Reads the next character.
 
Methods inherited from class com.caucho.vfs.i18n.EncodingReader
close, create, getJavaEncoding, setJavaEncoding
 
Methods inherited from class java.io.Reader
mark, markSupported, read, read, ready, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ISO8859_1Reader

public ISO8859_1Reader()
Null-arg constructor for instantiation by com.caucho.vfs.Encoding only.


ISO8859_1Reader

public ISO8859_1Reader(java.io.InputStream is)
Create an ISO-8859-1 reader based on the readStream.

Method Detail

create

public java.io.Reader create(java.io.InputStream is,
                             java.lang.String javaEncoding)
Create a ISO-8859-1 reader based on the readStream.

Specified by:
create in class EncodingReader
Parameters:
is - the input stream providing the bytes.
javaEncoding - the JDK name for the encoding.
Returns:
null, since ReadStream handles this directly.

read

public int read()
         throws java.io.IOException
Reads the next character.

Specified by:
read in class EncodingReader
Returns:
the next character or -1 on end of file.
Throws:
java.io.IOException

read

public int read(char[] buf,
                int offset,
                int length)
         throws java.io.IOException
Reads the next character.

Overrides:
read in class EncodingReader
Parameters:
buf - character buffer receiving the data.
offset - starting offset into the buffer.
length - number of characters to read.
Returns:
the number of characters read or -1 on end of file.
Throws:
java.io.IOException