jwutil.io
Class ReaderInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by jwutil.io.ReaderInputStream
All Implemented Interfaces:
java.io.Closeable

public class ReaderInputStream
extends java.io.InputStream

Adapter between a Reader and an InputStream.

Version:
$Id: ReaderInputStream.java 2279 2005-05-28 10:24:54Z joewhaley $
Author:
jwhaley

Field Summary
protected  byte[] buf
           
protected  char[] charbuf
           
protected  int index
           
protected  java.io.Reader reader
           
 
Constructor Summary
ReaderInputStream(java.io.Reader r)
           
 
Method Summary
 int available()
           
 int read()
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class java.io.InputStream
close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reader

protected final java.io.Reader reader

buf

protected byte[] buf

index

protected int index

charbuf

protected transient char[] charbuf
Constructor Detail

ReaderInputStream

public ReaderInputStream(java.io.Reader r)
Method Detail

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

available

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

read

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


Copyright © 2004-2008 SUIF Compiler Group. All Rights Reserved.