Package org.dict.zip

Class DictZipOutputStream

    • Field Detail

      • def

        protected Deflater def
        Compressor for this stream.
      • buf

        protected byte[] buf
        Output buffer for writing compressed data.
      • crc

        protected CRC32 crc
        CRC-32 of uncompressed data.
    • Method Detail

      • deflate

        protected void deflate()
                        throws IOException
        Writes next block of compressed data to the output stream.
        Throws:
        IOException - if an I/O error has occurred
      • write

        public void write​(byte[] b,
                          int off,
                          int len)
                   throws IOException
        Writes an array of bytes to the compressed output stream.

        This method will block until all the bytes are written.

        Overrides:
        write in class FilterOutputStream
        Parameters:
        b - the data to be written
        off - the start offset of the data
        len - the length of the data
        Throws:
        IOException - if an I/O error has occurred
      • write

        public void write​(int b)
                   throws IOException
        Writes a byte to the compressed output stream.

        This method will block until the byte can be written.

        Overrides:
        write in class FilterOutputStream
        Parameters:
        b - the byte to be written
        Throws:
        IOException - if an I/O error has occurred
      • finish

        public final void finish()
                          throws IOException
        Finish compression, as same function as GZIPOutputStream.
        Throws:
        IOException - if I/O error occured.