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.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
    Constructor and Description
    `ServletInputStreamWrapper(javax.servlet.ServletInputStream stream)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `available()`
    `void` | `close()`
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `boolean` | `isFinished()`
    `boolean` | `isReady()`
    `void` | `mark(int readlimit)`
    `boolean` | `markSupported()`
    `int` | `read()`
    `int` | `read(byte[] b)`
    `int` | `read(byte[] b, int off, int len)`
    `int` | `readLine(byte[] b, int off, int len)`
    `void` | `reset()`
    `void` | `setReadListener(javax.servlet.ReadListener arg0)`
    `long` | `skip(long n)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ServletInputStreamWrapper

          public ServletInputStreamWrapper(javax.servlet.ServletInputStream stream)
                                    throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### available

          public int available()
                        throws IOException

      Overrides:
        `available` in class `InputStream`
      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `InputStream`
      Throws:
        `IOException`

    - #### isFinished

          public boolean isFinished()

      Specified by:
        `isFinished` in class `javax.servlet.ServletInputStream`

    - #### isReady

          public boolean isReady()

      Specified by:
        `isReady` in class `javax.servlet.ServletInputStream`

    - #### read

          public int read()
                   throws IOException

      Specified by:
        `read` in class `InputStream`
      Throws:
        `IOException`

    - #### read

          public int read(byte[] b)
                   throws IOException

      Overrides:
        `read` in class `InputStream`
      Throws:
        `IOException`

    - #### read

          public int read(byte[] b,
                          int off,
                          int len)
                   throws IOException

      Overrides:
        `read` in class `InputStream`
      Throws:
        `IOException`

    - #### mark

          public void mark(int readlimit)

      Overrides:
        `mark` in class `InputStream`

    - #### markSupported

          public boolean markSupported()

      Overrides:
        `markSupported` in class `InputStream`

    - #### readLine

          public int readLine(byte[] b,
                              int off,
                              int len)
                       throws IOException

      Overrides:
        `readLine` in class `javax.servlet.ServletInputStream`
      Throws:
        `IOException`

    - #### reset

          public void reset()
                     throws IOException

      Overrides:
        `reset` in class `InputStream`
      Throws:
        `IOException`

    - #### setReadListener

          public void setReadListener(javax.servlet.ReadListener arg0)

      Specified by:
        `setReadListener` in class `javax.servlet.ServletInputStream`

    - #### skip

          public long skip(long n)
                    throws IOException

      Overrides:
        `skip` in class `InputStream`
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.