Package org.apache.hc.core5.http.impl.io
Class IdentityInputStream
java.lang.Object
java.io.InputStream
org.apache.hc.core5.http.impl.io.IdentityInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
Input stream that reads data without any transformation. The end of the
content entity is demarcated by closing the underlying connection
(EOF condition). Entities transferred using this input stream can be of
unlimited length.
Note that this class NEVER closes the underlying stream, even when
close() gets called. Instead, the stream will be marked as
closed and no further reading will be permitted.
- Since:
- 4.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SessionInputBufferprivate booleanprivate final InputStream -
Constructor Summary
ConstructorsConstructorDescriptionIdentityInputStream(SessionInputBuffer buffer, InputStream inputStream) Default constructor. -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
-
Field Details
-
buffer
-
inputStream
-
closed
private boolean closed
-
-
Constructor Details
-
IdentityInputStream
Default constructor.- Parameters:
buffer- Session input bufferinputStream- Input stream
-
-
Method Details
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
Marks this stream as closed, but does NOT close the underlying stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException- If an I/O problem occurs.
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-