Class ZstdDirectBufferCompressingStreamNoFinalizer

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

    public class ZstdDirectBufferCompressingStreamNoFinalizer
    extends java.lang.Object
    implements java.io.Closeable, java.io.Flushable
    • Constructor Detail

      • ZstdDirectBufferCompressingStreamNoFinalizer

        public ZstdDirectBufferCompressingStreamNoFinalizer​(java.nio.ByteBuffer target,
                                                            int level)
                                                     throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • flushBuffer

        protected java.nio.ByteBuffer flushBuffer​(java.nio.ByteBuffer toFlush)
                                           throws java.io.IOException
        This method should flush the buffer and either return the same buffer (but cleared) or a new buffer that should be used from then on.
        Parameters:
        toFlush - buffer that has to be flushed (or most cases, you want to call Buffer.flip() first)
        Returns:
        the new buffer to use, for most cases the same as the one passed in, after a call to Buffer.clear().
        Throws:
        java.io.IOException
      • recommendedOutputBufferSize

        public static int recommendedOutputBufferSize()
      • compress

        public void compress​(java.nio.ByteBuffer source)
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        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