Package org.apache.solr.servlet
Class ServletInputStreamWrapper
java.lang.Object
java.io.InputStream
jakarta.servlet.ServletInputStream
org.apache.solr.servlet.ServletInputStreamWrapper
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ServletInputStreamWrapper
extends jakarta.servlet.ServletInputStream
Provides a convenient extension of the
ServletInputStream class that can be subclassed by
developers wishing to adapt the behavior of a Stream. One such example may be to override close() to instead be a no-op as in SOLR-8933.
This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped stream.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoidclose()booleaninthashCode()booleanbooleanisReady()voidmark(int readlimit) booleanintread()intread(byte[] b) intread(byte[] b, int off, int len) intreadLine(byte[] b, int off, int len) voidreset()voidsetReadListener(jakarta.servlet.ReadListener arg0) longskip(long n) toString()Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
ServletInputStreamWrapper
- Throws:
IOException
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
isFinished
public boolean isFinished()- Specified by:
isFinishedin classjakarta.servlet.ServletInputStream
-
isReady
public boolean isReady()- Specified by:
isReadyin classjakarta.servlet.ServletInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
readLine
- Overrides:
readLinein classjakarta.servlet.ServletInputStream- Throws:
IOException
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
setReadListener
public void setReadListener(jakarta.servlet.ReadListener arg0) - Specified by:
setReadListenerin classjakarta.servlet.ServletInputStream
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
toString
-