Package org.postgresql.core

# Class FixedLengthOutputStream

java.lang.Object
java.io.OutputStream
org.postgresql.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
  Description
  `FixedLengthOutputStream(int size, OutputStream target)`

- ## Method Summary

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

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

  `close, flush, nullOutputStream, write`

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

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

- ## Constructor Details

  - ### FixedLengthOutputStream

    public FixedLengthOutputStream(int size, OutputStream target)

- ## Method Details

  - ### 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()