Module methanol

Interface AsyncDecoder.ByteSource

Enclosing interface:
AsyncDecoder

public static interface AsyncDecoder.ByteSource
A source of bytes for reading the compressed stream as ByteBuffer chunks.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a read-only ByteBuffer representing the currently available chunk.
    boolean
    Returns true if this source is final and no more decode operations are to be expected.
    default boolean
    Returns true if this source has remaining bytes.
    default void
    Pulls min(this.remaining(), dst.remaining()) bytes from this source to the given destination buffer.
    long
    Returns the total number of bytes remaining in this source.
  • Method Details

    • currentSource

      ByteBuffer currentSource()
      Returns a read-only ByteBuffer representing the currently available chunk.
    • pullBytes

      default void pullBytes(ByteBuffer dst)
      Pulls min(this.remaining(), dst.remaining()) bytes from this source to the given destination buffer.
    • remaining

      long remaining()
      Returns the total number of bytes remaining in this source.
    • hasRemaining

      default boolean hasRemaining()
      Returns true if this source has remaining bytes.
    • finalSource

      boolean finalSource()
      Returns true if this source is final and no more decode operations are to be expected.