org.restlet.engine.http.io
Class ClosingInputStream

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

public class ClosingInputStream
extends InputEntityStream

Input stream based on a source stream that must only be totally read before closing.

Author:
Jerome Louvel

Constructor Summary
ClosingInputStream(Notifiable notifiable, InputStream inboundStream)
          Constructor.
 
Method Summary
 int read()
           
 int read(byte[] b, int off, int len)
           
 
Methods inherited from class org.restlet.engine.http.io.InputEntityStream
getInboundStream, onEndReached, onError
 
Methods inherited from class java.io.InputStream
available, close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClosingInputStream

public ClosingInputStream(Notifiable notifiable,
                          InputStream inboundStream)
Constructor.

Parameters:
notifiable - The notifiable connection.
inboundStream - The inbound stream.
Method Detail

read

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

read

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


Copyright © 2005-2011 Noelios Technologies.