BZip2DummyDecompressor (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.io.compress.bzip2, class: BZip2DummyDecompressor

Package org.apache.hadoop.io.compress.bzip2

# Class BZip2DummyDecompressor

java.lang.Object
org.apache.hadoop.io.compress.bzip2.BZip2DummyDecompressor

All Implemented Interfaces:
  `Decompressor`

public class BZip2DummyDecompressor extends Object implements Decompressor
This is a dummy decompressor for BZip2.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BZip2DummyDecompressor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `decompress(byte[] b, int off, int len)`
  Fills specified buffer with uncompressed data.
  `void`
  `end()`
  Closes the decompressor and discards any unprocessed input.
  `boolean`
  `finished()`
  Returns `true` if the end of the decompressed data output stream has been reached.
  `int`
  `getRemaining()`
  Returns the number of bytes remaining in the compressed data buffer.
  `boolean`
  `needsDictionary()`
  Returns `true` if a preset dictionary is needed for decompression.
  `boolean`
  `needsInput()`
  Returns `true` if the input data buffer is empty and `Decompressor.setInput(byte[], int, int)` should be called to provide more input.
  `void`
  `reset()`
  Resets decompressor and input and output buffers so that a new set of input data can be processed.
  `void`
  `setDictionary(byte[] b, int off, int len)`
  Sets preset dictionary for compression.
  `void`
  `setInput(byte[] b, int off, int len)`
  Sets input data for decompression.

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

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

- ## Constructor Details

  - ### BZip2DummyDecompressor

    public BZip2DummyDecompressor()

- ## Method Details

  - ### decompress

    public int decompress(byte[] b, int off, int len) throws IOException
    Description copied from interface: `Decompressor`
    Fills specified buffer with uncompressed data. Returns actual number of bytes of uncompressed data. A return value of 0 indicates that `Decompressor.needsInput()` should be called in order to determine if more input data is required.
    Specified by:
      `decompress` in interface `Decompressor`
    Parameters:
      `b` - Buffer for the uncompressed data
      `off` - Start offset of the data
      `len` - Size of the buffer
    Returns:
      The actual number of bytes of uncompressed data.
    Throws:
      `IOException` - raised on errors performing I/O.

  - ### end

    public void end()
    Description copied from interface: `Decompressor`
    Closes the decompressor and discards any unprocessed input.
    Specified by:
      `end` in interface `Decompressor`

  - ### finished

    public boolean finished()
    Description copied from interface: `Decompressor`
    Returns `true` if the end of the decompressed data output stream has been reached. Indicates a concatenated data stream when finished() returns `true` and `Decompressor.getRemaining()` returns a positive value. finished() will be reset with the `Decompressor.reset()` method.
    Specified by:
      `finished` in interface `Decompressor`
    Returns:
      `true` if the end of the decompressed data output stream has been reached.

  - ### needsDictionary

    public boolean needsDictionary()
    Description copied from interface: `Decompressor`
    Returns `true` if a preset dictionary is needed for decompression.
    Specified by:
      `needsDictionary` in interface `Decompressor`
    Returns:
      `true` if a preset dictionary is needed for decompression

  - ### needsInput

    public boolean needsInput()
    Description copied from interface: `Decompressor`
    Returns `true` if the input data buffer is empty and `Decompressor.setInput(byte[], int, int)` should be called to provide more input.
    Specified by:
      `needsInput` in interface `Decompressor`
    Returns:
      `true` if the input data buffer is empty and `Decompressor.setInput(byte[], int, int)` should be called in order to provide more input.

  - ### getRemaining

    public int getRemaining()
    Description copied from interface: `Decompressor`
    Returns the number of bytes remaining in the compressed data buffer. Indicates a concatenated data stream if `Decompressor.finished()` returns `true` and getRemaining() returns a positive value. If `Decompressor.finished()` returns `true` and getRemaining() returns a zero value, indicates that the end of data stream has been reached and is not a concatenated data stream.
    Specified by:
      `getRemaining` in interface `Decompressor`
    Returns:
      The number of bytes remaining in the compressed data buffer.

  - ### reset

    public void reset()
    Description copied from interface: `Decompressor`
    Resets decompressor and input and output buffers so that a new set of input data can be processed. If `Decompressor.finished()`} returns `true` and `Decompressor.getRemaining()` returns a positive value, reset() is called before processing of the next data stream in the concatenated data stream. `Decompressor.finished()` will be reset and will return `false` when reset() is called.
    Specified by:
      `reset` in interface `Decompressor`

  - ### setDictionary

    public void setDictionary(byte[] b, int off, int len)
    Description copied from interface: `Decompressor`
    Sets preset dictionary for compression. A preset dictionary is used when the history buffer can be predetermined.
    Specified by:
      `setDictionary` in interface `Decompressor`
    Parameters:
      `b` - Dictionary data bytes
      `off` - Start offset
      `len` - Length

  - ### setInput

    public void setInput(byte[] b, int off, int len)
    Description copied from interface: `Decompressor`
    Sets input data for decompression. This should be called if and only if `Decompressor.needsInput()` returns `true` indicating that more input data is required. (Both native and non-native versions of various Decompressors require that the data passed in via `b[]` remain unmodified until the caller is explicitly notified--via `Decompressor.needsInput()`--that the buffer may be safely modified. With this requirement, an extra buffer-copy can be avoided.)
    Specified by:
      `setInput` in interface `Decompressor`
    Parameters:
      `b` - Input data
      `off` - Start offset
      `len` - Length