org.restlet.engine.io
Class ReaderInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.restlet.engine.io.ReaderInputStream
All Implemented Interfaces:
java.io.Closeable

public class ReaderInputStream
extends java.io.InputStream

Input stream based on a reader.

Author:
Jerome Louvel

Constructor Summary
ReaderInputStream(java.io.Reader reader, CharacterSet characterSet)
          Constructor.
 
Method Summary
 int available()
           
 void close()
           
 int read()
           
 
Methods inherited from class java.io.InputStream
mark, markSupported, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReaderInputStream

public ReaderInputStream(java.io.Reader reader,
                         CharacterSet characterSet)
                  throws java.io.IOException
Constructor.

Parameters:
reader - The reader to wrap as an input stream.
characterSet - The character set to use for encoding.
Throws:
java.io.IOException
Method Detail

available

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

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
Throws:
java.io.IOException

read

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


Copyright © 2005-2010 Noelios Technologies.