Class ZstdDirectBufferDecompressingStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class ZstdDirectBufferDecompressingStream
    extends java.lang.Object
    implements java.io.Closeable
    • Constructor Detail

      • ZstdDirectBufferDecompressingStream

        public ZstdDirectBufferDecompressingStream​(java.nio.ByteBuffer source)
    • Method Detail

      • refill

        protected java.nio.ByteBuffer refill​(java.nio.ByteBuffer toRefill)
        Override this method in case the byte buffer passed to the constructor might not contain the full compressed stream
        Parameters:
        toRefill - current buffer
        Returns:
        either the current buffer (but refilled and flipped if there was new content) or a new buffer.
      • setFinalize

        public void setFinalize​(boolean finalize)
        Enable or disable class finalizers If finalizers are disabled the responsibility fir calling the `close` method is on the consumer.
        Parameters:
        finalize - default `true` - finalizers are enabled
      • hasRemaining

        public boolean hasRemaining()
      • recommendedTargetBufferSize

        public static int recommendedTargetBufferSize()
      • read

        public int read​(java.nio.ByteBuffer target)
                 throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable