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

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.nio.ByteBuffer currentSource()
      Returns a read-only ByteBuffer representing the currently available chunk.
      boolean finalSource()
      Returns true if this source is final and no more decode operations are to be expected.
      default boolean hasRemaining()
      Returns true if this source has remaining bytes.
      default void pullBytes​(java.nio.ByteBuffer dst)
      Pulls min(this.remaining(), dst.remaining()) bytes from this source to the given destination buffer.
      long remaining()
      Returns the total number of bytes remaining in this source.
    • Method Detail

      • currentSource

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

        default void pullBytes​(java.nio.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.