Package com.fasterxml.jackson.core.io

# Class DataOutputAsStream

java.lang.Object
java.io.OutputStream
com.fasterxml.jackson.core.io.DataOutputAsStream

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

public class DataOutputAsStream extends OutputStream
Helper class to support use of `DataOutput` for output, directly, without caller having to provide for implementation.

Since:
  2.8

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final DataOutput`
`_output`

## Constructor Summary

Constructors
Constructor
Description
`DataOutputAsStream(DataOutput out)`

## Method Summary

Modifier and Type
Method
Description
`void`
`write(byte[] b)`
`void`
`write(byte[] b, int offset, int length)`
`void`
`write(int b)`

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

`close, flush, nullOutputStream`

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

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

## Field Details

### _output

protected final DataOutput _output

## Constructor Details

### DataOutputAsStream

public DataOutputAsStream(DataOutput out)

## Method Details

### 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 offset, int length) throws IOException

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