org.apache.solr.servlet

## Class ServletOutputStreamWrapper

- java.lang.Object
- - java.io.OutputStream
  - - javax.servlet.ServletOutputStream
    - - org.apache.solr.servlet.ServletOutputStreamWrapper

- All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

      public class ServletOutputStreamWrapper
      extends javax.servlet.ServletOutputStream

  Provides a convenient extension of the `ServletOutputStream` 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
    `ServletOutputStreamWrapper(javax.servlet.ServletOutputStream stream)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `boolean` | `equals(Object obj)`
    `void` | `flush()`
    `int` | `hashCode()`
    `boolean` | `isReady()`
    `void` | `print(boolean arg0)`
    `void` | `print(char c)`
    `void` | `print(double d)`
    `void` | `print(float f)`
    `void` | `print(int i)`
    `void` | `print(long l)`
    `void` | `print(String arg0)`
    `void` | `println()`
    `void` | `println(boolean b)`
    `void` | `println(char c)`
    `void` | `println(double d)`
    `void` | `println(float f)`
    `void` | `println(int i)`
    `void` | `println(long l)`
    `void` | `println(String s)`
    `void` | `setWriteListener(javax.servlet.WriteListener arg0)`
    `String` | `toString()`
    `void` | `write(byte[] b)`
    `void` | `write(byte[] b, int off, int len)`
    `void` | `write(int b)`

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

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

- - ### Constructor Detail

    - #### ServletOutputStreamWrapper

          public ServletOutputStreamWrapper(javax.servlet.ServletOutputStream stream)

  - ### Method Detail

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### flush

          public void flush()
                     throws IOException

      Specified by:
        `flush` in interface `Flushable`
      Overrides:
        `flush` in class `OutputStream`
      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

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

    - #### isReady

          public boolean isReady()

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

    - #### print

          public void print(boolean arg0)
                     throws IOException

      Overrides:
        `print` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### print

          public void print(char c)
                     throws IOException

      Overrides:
        `print` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### print

          public void print(double d)
                     throws IOException

      Overrides:
        `print` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### print

          public void print(float f)
                     throws IOException

      Overrides:
        `print` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### print

          public void print(int i)
                     throws IOException

      Overrides:
        `print` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### print

          public void print(long l)
                     throws IOException

      Overrides:
        `print` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### print

          public void print(String arg0)
                     throws IOException

      Overrides:
        `print` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### println

          public void println()
                       throws IOException

      Overrides:
        `println` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### println

          public void println(boolean b)
                       throws IOException

      Overrides:
        `println` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### println

          public void println(char c)
                       throws IOException

      Overrides:
        `println` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### println

          public void println(double d)
                       throws IOException

      Overrides:
        `println` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### println

          public void println(float f)
                       throws IOException

      Overrides:
        `println` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### println

          public void println(int i)
                       throws IOException

      Overrides:
        `println` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### println

          public void println(long l)
                       throws IOException

      Overrides:
        `println` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### println

          public void println(String s)
                       throws IOException

      Overrides:
        `println` in class `javax.servlet.ServletOutputStream`
      Throws:
        `IOException`

    - #### setWriteListener

          public void setWriteListener(javax.servlet.WriteListener arg0)

      Specified by:
        `setWriteListener` in class `javax.servlet.ServletOutputStream`

    - #### write

          public void write(int b)
                     throws IOException

      Specified by:
        `write` in class `OutputStream`
      Throws:
        `IOException`

    - #### write

          public void write(byte[] b)
                     throws IOException

      Overrides:
        `write` in class `OutputStream`
      Throws:
        `IOException`

    - #### write

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

      Overrides:
        `write` in class `OutputStream`
      Throws:
        `IOException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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