i2p.susi.util

## Class DecodingOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - i2p.susi.util.DecodingOutputStream

- All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

      public class DecodingOutputStream
      extends OutputStream

  Buffering decoder that outputs to a Writer. Adapted from SAM UTF8Reader.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DecodingOutputStream(Writer out, String charset)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Only flushes.
    `void` | `flush()`
    `void` | `write(byte[] buf, int off, int len)`
    `void` | `write(int b)`

    - ### Methods inherited from class java.io.OutputStream

      `write`

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

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

- - ### Constructor Detail

    - #### DecodingOutputStream

          public DecodingOutputStream(Writer out,
                                      String charset)
                               throws UnsupportedEncodingException

      Parameters:
        `out` - UTF-8
      Throws:
        `UnsupportedEncodingException` - (an IOException) on unknown charset

  - ### Method Detail

    - #### close

          public void close()
                     throws IOException

      Only flushes. Does NOT close the writer
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Overrides:
        `close` in class `OutputStream`
      Throws:
        `IOException`

    - #### flush

          public void flush()
                     throws IOException

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

    - #### write

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

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

    - #### write

          public void write(int b)
                     throws IOException

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