Package org.apache.solr.servlet
Class ServletInputStreamWrapper
- java.lang.Object
-
- java.io.InputStream
-
- javax.servlet.ServletInputStream
-
- org.apache.solr.servlet.ServletInputStreamWrapper
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class ServletInputStreamWrapper extends javax.servlet.ServletInputStreamProvides a convenient extension of theServletInputStreamclass that can be subclassed by developers wishing to adapt the behavior of a Stream. One such example may be to overrideclose()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 Constructor Description ServletInputStreamWrapper(javax.servlet.ServletInputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()booleanequals(Object obj)inthashCode()booleanisFinished()booleanisReady()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)intreadLine(byte[] b, int off, int len)voidreset()voidsetReadListener(javax.servlet.ReadListener arg0)longskip(long n)StringtoString()-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
ServletInputStreamWrapper
public ServletInputStreamWrapper(javax.servlet.ServletInputStream stream) throws IOException- Throws:
IOException
-
-
Method Detail
-
available
public int available() throws IOException- Overrides:
availablein classInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
isFinished
public boolean isFinished()
- Specified by:
isFinishedin classjavax.servlet.ServletInputStream
-
isReady
public boolean isReady()
- Specified by:
isReadyin classjavax.servlet.ServletInputStream
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit)
- Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()
- Overrides:
markSupportedin classInputStream
-
readLine
public int readLine(byte[] b, int off, int len) throws IOException- Overrides:
readLinein classjavax.servlet.ServletInputStream- Throws:
IOException
-
reset
public void reset() throws IOException- Overrides:
resetin classInputStream- Throws:
IOException
-
setReadListener
public void setReadListener(javax.servlet.ReadListener arg0)
- Specified by:
setReadListenerin classjavax.servlet.ServletInputStream
-
skip
public long skip(long n) throws IOException- Overrides:
skipin classInputStream- Throws:
IOException
-
-