public class EntityInputStream extends org.glassfish.jersey.innate.io.InputStreamWrapper
| Constructor and Description |
|---|
EntityInputStream(InputStream input)
Extension constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
The method is customized to not throw an
IOException if the close operation fails. |
static EntityInputStream |
create(InputStream inputStream)
Create an entity input stream instance wrapping the original input stream.
|
void |
ensureNotClosed()
Check that the entity input stream has not been closed yet.
|
protected InputStream |
getWrapped()
Return the wrapped stream
|
InputStream |
getWrappedStream()
Get the wrapped input stream instance.
|
boolean |
isClosed()
Get the closed status of this input stream.
|
boolean |
isEmpty()
Check if the underlying entity stream is empty.
|
void |
reset()
The method is customized to not throw an
IOException if the reset operation fails. |
void |
setWrappedStream(InputStream wrapped)
Set the wrapped input stream instance.
|
available, getWrappedIOE, mark, markSupported, read, read, read, skippublic EntityInputStream(InputStream input)
input - underlying wrapped input stream.public static EntityInputStream create(InputStream inputStream)
EntityInputStream,
the stream is returned without wrapping.inputStream - input stream.public void reset()
The method is customized to not throw an IOException if the reset operation fails. Instead,
a runtime ProcessingException is thrown.
reset in class org.glassfish.jersey.innate.io.InputStreamWrapperProcessingException - in case the reset operation on the underlying entity input stream failed.public void close()
throws ProcessingException
The method is customized to not throw an IOException if the close operation fails. Instead,
a warning message is logged.
close in interface Closeableclose in interface AutoCloseableclose in class org.glassfish.jersey.innate.io.InputStreamWrapperProcessingExceptionpublic boolean isEmpty()
Note that the operation may need to block until a first byte (or EOF) is available in the stream.
true if the entity stream is empty, false otherwise.public void ensureNotClosed()
throws IllegalStateException
IllegalStateException - in case the entity input stream has been closed.public boolean isClosed()
true if the stream has been closed, false otherwise.public final InputStream getWrappedStream()
public final void setWrappedStream(InputStream wrapped)
wrapped - new input stream instance to be wrapped.protected InputStream getWrapped()
org.glassfish.jersey.innate.io.InputStreamWrappergetWrapped in class org.glassfish.jersey.innate.io.InputStreamWrapperCopyright © 2007-2024,Oracleand/or its affiliates.All Rights Reserved. Use is subject to license terms.