org.apache.commons.imaging.common

## Class BinaryOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - org.apache.commons.imaging.common.BinaryOutputStream

- All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

      public class BinaryOutputStream
      extends OutputStream

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `BinaryOutputStream(OutputStream os)`
    `BinaryOutputStream(OutputStream os, ByteOrder byteOrder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `flush()`
    `int` | `getByteCount()`
    `ByteOrder` | `getByteOrder()`
    `protected void` | `setByteOrder(ByteOrder byteOrder)`
    `void` | `write(byte[] bytes)`
    `void` | `write(byte[] bytes, int offset, int length)`
    `void` | `write(int i)`
    `void` | `write2Bytes(int value)`
    `void` | `write3Bytes(int value)`
    `void` | `write4Bytes(int value)`

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

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

- - ### Constructor Detail

    - #### BinaryOutputStream

          public BinaryOutputStream(OutputStream os,
                                    ByteOrder byteOrder)

    - #### BinaryOutputStream

          public BinaryOutputStream(OutputStream os)

  - ### Method Detail

    - #### setByteOrder

          protected void setByteOrder(ByteOrder byteOrder)

    - #### getByteOrder

          public ByteOrder getByteOrder()

    - #### write

          public void write(int i)
                     throws IOException

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

    - #### write

          public final void write(byte[] bytes)
                           throws IOException

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

    - #### write

          public final void write(byte[] bytes,
                                  int offset,
                                  int length)
                           throws IOException

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

    - #### 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`

    - #### getByteCount

          public int getByteCount()

    - #### write4Bytes

          public final void write4Bytes(int value)
                                 throws IOException

      Throws:
        `IOException`

    - #### write3Bytes

          public final void write3Bytes(int value)
                                 throws IOException

      Throws:
        `IOException`

    - #### write2Bytes

          public final void write2Bytes(int value)
                                 throws IOException

      Throws:
        `IOException`

Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.