org.restlet.engine.io
Class ReaderInputStream

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

public class ReaderInputStream
extends InputStream

Input stream based on a reader.

Author:
Jerome Louvel

Constructor Summary
ReaderInputStream(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(Reader reader,
                         CharacterSet characterSet)
                  throws IOException
Constructor.

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

available

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

close

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

read

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


Copyright © 2005-2011 Noelios Technologies.