SimpleBufferedOutputStream (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io.file.tfile, class: SimpleBufferedOutputStream

Package org.apache.hadoop.io.file.tfile

# Class SimpleBufferedOutputStream

java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
org.apache.hadoop.io.file.tfile.SimpleBufferedOutputStream

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

public class SimpleBufferedOutputStream extends FilterOutputStream
A simplified BufferedOutputStream with borrowed buffer, and allow users to see how much data have been buffered.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected byte[]`
  `buf`
  `protected int`
  `count`

  ### Fields inherited from class java.io.FilterOutputStream

  `out`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleBufferedOutputStream(OutputStream out, byte[] buf)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `flush()`
  `int`
  `size()`
  `void`
  `write(byte[] b, int off, int len)`
  `void`
  `write(int b)`

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

  `close, write`

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

- ## Field Details

  - ### buf

    protected byte[] buf

  - ### count

    protected int count

- ## Constructor Details

  - ### SimpleBufferedOutputStream

    public SimpleBufferedOutputStream(OutputStream out, byte[] buf)

- ## Method Details

  - ### write

    public void write(int b) throws IOException
    Overrides:
      `write` in class `FilterOutputStream`
    Throws:
      `IOException`

  - ### write

    public void write(byte[] b, int off, int len) throws IOException
    Overrides:
      `write` in class `FilterOutputStream`
    Throws:
      `IOException`

  - ### flush

    public void flush() throws IOException
    Specified by:
      `flush` in interface `Flushable`
    Overrides:
      `flush` in class `FilterOutputStream`
    Throws:
      `IOException`

  - ### size

    public int size()