### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.iom

# Class OutputStream

java.lang.Object
java.io.OutputStream
com.sas.iom.OutputStream

All Implemented Interfaces:
  `Closeable`, `Flushable`, `AutoCloseable`

@SASScope("ALL") @BinaryCompatibilityOnly public class OutputStream extends OutputStream
Provides the capability to write output to an IOM OutputStream.

Since:
  1.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OutputStream(ICacheWriter iCacheWriter, ICacheService iCacheService)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `void`
  `flush()`
  `com.sas.io.OutputStreamHeaderInterface`
  `getHeader()`
  Get the header interface for this OutputStream.
  `void`
  `putData(byte[] data)`
  Put data to this OutputStream.
  `void`
  `putData(String data)`
  Put data to this OutputStream.
  `void`
  `putData(String data, String encoding)`
  Put data to this OutputStream.
  `void`
  `write(byte[] b)`
  `void`
  `write(byte[] b, int off, int len)`
  `void`
  `write(int b)`

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

  `nullOutputStream`

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

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

- ## Constructor Details

  - ### OutputStream

    public OutputStream(ICacheWriter iCacheWriter, ICacheService iCacheService)

- ## Method Details

  - ### getHeader

    public com.sas.io.OutputStreamHeaderInterface getHeader()
    Get the header interface for this OutputStream.
    Returns:
      header OutputStream header.
    See Also:
      - `OutputStreamHeaderInterface`

  - ### putData

    public void putData(byte[] data)
    Put data to this OutputStream.
    Parameters:
      `data` - Data to write.

  - ### putData

    public void putData(String data)
    Put data to this OutputStream.
    Parameters:
      `data` - Data to write.

  - ### putData

    public void putData(String data, String encoding)
    Put data to this OutputStream.
    Parameters:
      `data` - Data to write.
      `encoding` - Name of a supported charset.

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

  - ### 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 `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Overrides:
      `close` in class `OutputStream`
    Throws:
      `IOException`