Package org.eclipse.jetty.ee10.servlet
Class HttpInput
java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
org.eclipse.jetty.ee10.servlet.HttpInput
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class HttpInput
extends jakarta.servlet.ServletInputStream
While this class is-a Runnable, it should never be dispatched in it's own thread. It is a runnable only so that the calling thread can use Context.run(Runnable)
to setup classloaders etc.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
long
long
boolean
Check if this HttpInput instance has content stored internally, without fetching/parsing anything from the underlying channel.boolean
isAsync()
boolean
isError()
boolean
boolean
isReady()
boolean
int
read()
int
read
(byte[] b, int off, int len) int
read
(ByteBuffer buffer) void
void
recycle()
void
reopen()
void
setReadListener
(jakarta.servlet.ReadListener readListener) toString()
Methods inherited from class jakarta.servlet.ServletInputStream
readLine
Methods inherited from class java.io.InputStream
close, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
HttpInput
-
-
Method Details
-
recycle
public void recycle() -
reopen
public void reopen() -
getContentConsumed
public long getContentConsumed() -
getContentReceived
public long getContentReceived() -
consumeAvailable
public boolean consumeAvailable() -
isError
public boolean isError() -
isAsync
public boolean isAsync() -
getInvocationType
-
isFinished
public boolean isFinished()- Specified by:
isFinished
in classjakarta.servlet.ServletInputStream
-
isReady
public boolean isReady()- Specified by:
isReady
in classjakarta.servlet.ServletInputStream
-
setReadListener
public void setReadListener(jakarta.servlet.ReadListener readListener) - Specified by:
setReadListener
in classjakarta.servlet.ServletInputStream
-
onContentProducible
public boolean onContentProducible() -
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
read
- Throws:
IOException
-
hasContent
public boolean hasContent()Check if this HttpInput instance has content stored internally, without fetching/parsing anything from the underlying channel.- Returns:
- true if the input contains content, false otherwise.
-
available
public int available()- Overrides:
available
in classInputStream
-
readCallback
public void readCallback() -
toString
-