Class ReaderInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--ReaderInputStream

public class ReaderInputStream
extends java.io.InputStream


Field Summary
protected  byte[] buffer
           
protected  java.io.ByteArrayOutputStream byteArrayOut
           
protected  char[] chars
           
protected  int index
           
protected  int length
           
protected  java.io.Reader reader
           
protected  java.io.Writer writer
           
 
Fields inherited from class java.io.InputStream
SKIP_BUFFER_SIZE, skipBuffer
 
Constructor Summary
ReaderInputStream(java.io.Reader reader)
           
ReaderInputStream(java.io.Reader reader, java.lang.String encoding)
           
 
Method Summary
 int available()
           
 void close()
           
protected  void fillBuffer()
           
 int read()
           
 int read(byte[] data, int off, int len)
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

reader

protected java.io.Reader reader

byteArrayOut

protected java.io.ByteArrayOutputStream byteArrayOut

writer

protected java.io.Writer writer

chars

protected char[] chars

buffer

protected byte[] buffer

index

protected int index

length

protected int length
Constructor Detail

ReaderInputStream

public ReaderInputStream(java.io.Reader reader)

ReaderInputStream

public ReaderInputStream(java.io.Reader reader,
                         java.lang.String encoding)
                  throws java.io.UnsupportedEncodingException
Method Detail

read

public int read()
         throws java.io.IOException
Overrides:
read in class java.io.InputStream

fillBuffer

protected void fillBuffer()
                   throws java.io.IOException

read

public int read(byte[] data,
                int off,
                int len)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.InputStream

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.io.InputStream