Class UnsafeContentInputStream

java.lang.Object
java.io.InputStream
com.yahoo.jdisc.handler.UnsafeContentInputStream
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
ContentInputStream

public class UnsafeContentInputStream extends InputStream

This class provides an adapter from a ReadableContentChannel to an InputStream. This class supports all regular InputStream operations, and can be combined with any other InputStream API.

Because this class encapsulates the reference-counted ContentChannel operations, one must be sure to always call close() before discarding it. Failure to do so will prevent the Container from ever shutting down.

Author:
Simon Thoresen Hult