org.restlet.engine.http.io

## Class ClosingInputStream

- java.lang.Object
- - java.io.InputStream
  - - org.restlet.engine.http.io.InputEntityStream
    - - org.restlet.engine.http.io.ClosingInputStream

All Implemented Interfaces:
  java.io.Closeable, java.lang.AutoCloseable

    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

Constructors
Constructor and Description
`ClosingInputStream(Notifiable notifiable, java.io.InputStream inboundStream)` Constructor.

### Method Summary

Methods
`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,
                      java.io.InputStream inboundStream)

Constructor.

Parameters:
  `notifiable` - The notifiable connection.
  `inboundStream` - The inbound stream.

### Method Detail

#### read

    public int read()
             throws java.io.IOException

Specified by:
  `read` 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`