FinishableWrapperOutputStream
Date: 2017-02-08

org.tukaani.xz

## Class FinishableWrapperOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - org.tukaani.xz.FinishableOutputStream
    - - org.tukaani.xz.FinishableWrapperOutputStream

- All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.AutoCloseable

      public class FinishableWrapperOutputStream
      extends FinishableOutputStream

  Wraps an output stream to a finishable output stream for use with raw encoders. This is not needed for XZ compression and thus most people will never need this.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.io.OutputStream` | `out` The `OutputStream` that has been wrapped into a FinishableWrapperOutputStream.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FinishableWrapperOutputStream(java.io.OutputStream out)` Creates a new output stream which support finishing.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Calls `out.close()`.
    `void` | `flush()` Calls `out.flush()`.
    `void` | `write(byte[] buf)` Calls `out.write(buf)`.
    `void` | `write(byte[] buf, int off, int len)` Calls `out.write(buf, off, len)`.
    `void` | `write(int b)` Calls `out.write(b)`.

    - ### Methods inherited from class org.tukaani.xz.FinishableOutputStream

      `finish`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### out

          protected java.io.OutputStream out

      The `OutputStream` that has been wrapped into a FinishableWrapperOutputStream.

  - ### Constructor Detail

    - #### FinishableWrapperOutputStream

          public FinishableWrapperOutputStream(java.io.OutputStream out)

      Creates a new output stream which support finishing. The `finish()` method will do nothing.

  - ### Method Detail

    - #### write

          public void write(int b)
                     throws java.io.IOException

      Calls `out.write(b)`.
      Specified by:
        `write` in class `java.io.OutputStream`
      Throws:
        `java.io.IOException`

    - #### write

          public void write(byte[] buf)
                     throws java.io.IOException

      Calls `out.write(buf)`.
      Overrides:
        `write` in class `java.io.OutputStream`
      Throws:
        `java.io.IOException`

    - #### write

          public void write(byte[] buf,
                   int off,
                   int len)
                     throws java.io.IOException

      Calls `out.write(buf, off, len)`.
      Overrides:
        `write` in class `java.io.OutputStream`
      Throws:
        `java.io.IOException`

    - #### flush

          public void flush()
                     throws java.io.IOException

      Calls `out.flush()`.
      Specified by:
        `flush` in interface `java.io.Flushable`
      Overrides:
        `flush` in class `java.io.OutputStream`
      Throws:
        `java.io.IOException`

    - #### close

          public void close()
                     throws java.io.IOException

      Calls `out.close()`.
      Specified by:
        `close` in interface `java.io.Closeable`
      Specified by:
        `close` in interface `java.lang.AutoCloseable`
      Overrides:
        `close` in class `java.io.OutputStream`
      Throws:
        `java.io.IOException`