com.amazon.redshift.core

## Class FixedLengthOutputStream

- java.lang.Object
- - java.io.OutputStream
  - - com.amazon.redshift.core.FixedLengthOutputStream

All Implemented Interfaces:
  Closeable, Flushable, AutoCloseable

    public class FixedLengthOutputStream
    extends OutputStream

A stream that refuses to write more than a maximum number of bytes.

### Constructor Summary

Constructors
Constructor and Description
`FixedLengthOutputStream(int size, OutputStream target)`

### Method Summary

Methods
`int` `remaining()`
`void` `write(byte[] buf, int offset, int len)`
`void` `write(int b)`

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

`close, flush, write`

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

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

### Constructor Detail

#### FixedLengthOutputStream

    public FixedLengthOutputStream(int size,
                           OutputStream target)

### Method Detail

#### write

    public void write(int b)
               throws IOException

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

#### write

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

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

#### remaining

    public int remaining()