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:
java.io.Closeable
,java.lang.AutoCloseable
public final class ContentInputStream extends UnsafeContentInputStream
This class extendsUnsafeContentInputStream
and 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 void
finalize()
-
Methods inherited from class com.yahoo.jdisc.handler.UnsafeContentInputStream
available, close, mark, markSupported, read, read, reset
-
-
-
-
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.
-
-