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 SummaryConstructors Constructor Description ServletInputStreamWrapper(javax.servlet.ServletInputStream stream)
 - 
Method SummaryAll 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.InputStreamnullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
 
- 
 
- 
- 
- 
Constructor Detail- 
ServletInputStreamWrapperpublic ServletInputStreamWrapper(javax.servlet.ServletInputStream stream) throws IOException- Throws:
- IOException
 
 
- 
 - 
Method Detail- 
availablepublic int available() throws IOException- Overrides:
- availablein class- InputStream
- Throws:
- IOException
 
 - 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Throws:
- IOException
 
 - 
isFinishedpublic boolean isFinished() - Specified by:
- isFinishedin class- javax.servlet.ServletInputStream
 
 - 
isReadypublic boolean isReady() - Specified by:
- isReadyin class- javax.servlet.ServletInputStream
 
 - 
readpublic int read() throws IOException- Specified by:
- readin class- InputStream
- Throws:
- IOException
 
 - 
readpublic int read(byte[] b) throws IOException- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
 - 
readpublic int read(byte[] b, int off, int len) throws IOException- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
 - 
markpublic void mark(int readlimit) - Overrides:
- markin class- InputStream
 
 - 
markSupportedpublic boolean markSupported() - Overrides:
- markSupportedin class- InputStream
 
 - 
readLinepublic int readLine(byte[] b, int off, int len) throws IOException- Overrides:
- readLinein class- javax.servlet.ServletInputStream
- Throws:
- IOException
 
 - 
resetpublic void reset() throws IOException- Overrides:
- resetin class- InputStream
- Throws:
- IOException
 
 - 
setReadListenerpublic void setReadListener(javax.servlet.ReadListener arg0) - Specified by:
- setReadListenerin class- javax.servlet.ServletInputStream
 
 - 
skippublic long skip(long n) throws IOException- Overrides:
- skipin class- InputStream
- Throws:
- IOException
 
 
- 
 
-