Package com.yahoo.jdisc.handler
Class ContentInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.yahoo.jdisc.handler.UnsafeContentInputStream
-
- com.yahoo.jdisc.handler.ContentInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public final class ContentInputStream extends UnsafeContentInputStream
This class extendsUnsafeContentInputStreamand adds a finalizer to it that callsUnsafeContentInputStream.close(). This has a performance impact, but ensures that an unclosed stream does not prevent shutdown.- Author:
- Simon Thoresen Hult
-
-
Constructor Summary
Constructors Constructor Description ContentInputStream(ReadableContentChannel content)Constructs a new ContentInputStream that reads from the givenReadableContentChannel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfinalize()-
Methods inherited from class com.yahoo.jdisc.handler.UnsafeContentInputStream
available, close, mark, markSupported, read, read, reset
-
Methods inherited from class java.io.InputStream
nullInputStream, read, readAllBytes, readNBytes, readNBytes, skip, transferTo
-
-
-
-
Constructor Detail
-
ContentInputStream
public ContentInputStream(ReadableContentChannel content)
Constructs a new ContentInputStream that reads from the givenReadableContentChannel.- Parameters:
content- The content to read the stream from.
-
-