Class ZstdCompressorOutputStream

    • Constructor Summary

      Constructors 
      Constructor Description
      ZstdCompressorOutputStream​(java.io.OutputStream outStream)
      Wraps the given stream into a zstd-jni ZstdOutputStream using the default values for level, closeFrameOnFlush and useChecksum.
      ZstdCompressorOutputStream​(java.io.OutputStream outStream, int level)
      Wraps the given stream into a zstd-jni ZstdOutputStream using the default values for closeFrameOnFlush and useChecksum.
      ZstdCompressorOutputStream​(java.io.OutputStream outStream, int level, boolean closeFrameOnFlush)
      Wraps the given stream into a zstd-jni ZstdOutputStream using the default value for useChecksum.
      ZstdCompressorOutputStream​(java.io.OutputStream outStream, int level, boolean closeFrameOnFlush, boolean useChecksum)
      Wraps the given stream into a zstd-jni ZstdOutputStream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void flush()  
      java.lang.String toString()  
      void write​(byte[] buf, int off, int len)  
      void write​(int b)  
      • Methods inherited from class java.io.OutputStream

        nullOutputStream, write
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ZstdCompressorOutputStream

        public ZstdCompressorOutputStream​(java.io.OutputStream outStream,
                                          int level,
                                          boolean closeFrameOnFlush,
                                          boolean useChecksum)
                                   throws java.io.IOException
        Wraps the given stream into a zstd-jni ZstdOutputStream.
        Parameters:
        outStream - the stream to write to
        level - value for zstd-jni's level argument
        closeFrameOnFlush - value for zstd-jni's closeFrameOnFlush argument
        useChecksum - value for zstd-jni's useChecksum argument
        Throws:
        java.io.IOException - if zstd-jni does
        Since:
        1.18
      • ZstdCompressorOutputStream

        public ZstdCompressorOutputStream​(java.io.OutputStream outStream,
                                          int level,
                                          boolean closeFrameOnFlush)
                                   throws java.io.IOException
        Wraps the given stream into a zstd-jni ZstdOutputStream using the default value for useChecksum.
        Parameters:
        outStream - the stream to write to
        level - value for zstd-jni's level argument
        closeFrameOnFlush - value for zstd-jni's closeFrameOnFlush argument
        Throws:
        java.io.IOException - if zstd-jni does
        Since:
        1.18
      • ZstdCompressorOutputStream

        public ZstdCompressorOutputStream​(java.io.OutputStream outStream,
                                          int level)
                                   throws java.io.IOException
        Wraps the given stream into a zstd-jni ZstdOutputStream using the default values for closeFrameOnFlush and useChecksum.
        Parameters:
        outStream - the stream to write to
        level - value for zstd-jni's level argument
        Throws:
        java.io.IOException - if zstd-jni does
        Since:
        1.18
      • ZstdCompressorOutputStream

        public ZstdCompressorOutputStream​(java.io.OutputStream outStream)
                                   throws java.io.IOException
        Wraps the given stream into a zstd-jni ZstdOutputStream using the default values for level, closeFrameOnFlush and useChecksum.
        Parameters:
        outStream - the stream to write to
        Throws:
        java.io.IOException - if zstd-jni does
    • Method Detail

      • close

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

        public void write​(int b)
                   throws java.io.IOException
        Specified by:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
      • write

        public void write​(byte[] buf,
                          int off,
                          int len)
                   throws java.io.IOException
        Overrides:
        write in class java.io.OutputStream
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • flush

        public void flush()
                   throws java.io.IOException
        Specified by:
        flush in interface java.io.Flushable
        Overrides:
        flush in class java.io.OutputStream
        Throws:
        java.io.IOException