IT. Expert System.

Android Reference

DeflaterOutputStream


java.util.zip

Class DeflaterOutputStream

    • Field Detail

      • buf

        protected byte[] buf
        The buffer for the data to be written to.
      • def

        protected Deflater def
        The deflater used.
    • Constructor Detail

      • DeflaterOutputStream

        public DeflaterOutputStream(OutputStream os,
                            Deflater def)
        This constructor lets you pass the Deflater specifying the compression algorithm.
        Parameters:
        os - is the OutputStream where to write the compressed data to.
        def - is the specific Deflater that is used to compress data.
      • DeflaterOutputStream

        public DeflaterOutputStream(OutputStream os)
        This is the most basic constructor. You only need to pass the OutputStream to which the compressed data shall be written to. The default settings for the Deflater and internal buffer are used. In particular the Deflater produces a ZLIB header in the output stream.
        Parameters:
        os - is the OutputStream where to write the compressed data to.
      • DeflaterOutputStream

        public DeflaterOutputStream(OutputStream os,
                            Deflater def,
                            int bsize)
        This constructor lets you specify both the compression algorithm as well as the internal buffer size to be used.
        Parameters:
        os - is the OutputStream where to write the compressed data to.
        def - is the specific Deflater that will be used to compress data.
        bsize - is the size to be used for the internal buffer.
      • DeflaterOutputStream

        public DeflaterOutputStream(OutputStream os,
                            boolean syncFlush)
        Since:
        1.7
      • DeflaterOutputStream

        public DeflaterOutputStream(OutputStream os,
                            Deflater def,
                            boolean syncFlush)
        Since:
        1.7
      • DeflaterOutputStream

        public DeflaterOutputStream(OutputStream os,
                            Deflater def,
                            int bsize,
                            boolean syncFlush)
        Since:
        1.7
    • Method Detail

      • deflate

        protected void deflate()
                        throws IOException
        Compress the data in the input buffer and write it to the underlying stream.
        Throws:
        IOException - If an error occurs during deflation.
      • close

        public void close()
                   throws IOException
        Writes any unwritten compressed data to the underlying stream, the closes all underlying streams. This stream can no longer be used after close() has been called.
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface AutoCloseable
        Overrides:
        close in class FilterOutputStream
        Throws:
        IOException - If an error occurs while closing the data compression process.
      • finish

        public void finish()
                    throws IOException
        Writes any unwritten data to the underlying stream. Does not close the stream.
        Throws:
        IOException - If an error occurs.
      • write

        public void write(int i)
                   throws IOException
        Description copied from class: FilterOutputStream
        Writes one byte to the target stream. Only the low order byte of the integer oneByte is written.
        Overrides:
        write in class FilterOutputStream
        Parameters:
        i - the byte to be written.
        Throws:
        IOException - if an I/O error occurs while writing to this stream.
      • write

        public void write(byte[] buffer,
                 int offset,
                 int byteCount)
                   throws IOException
        Compresses byteCount bytes of data from buf starting at offset and writes it to the underlying stream.
        Overrides:
        write in class FilterOutputStream
        Parameters:
        buffer - the buffer to write.
        offset - the index of the first byte in buffer to write.
        byteCount - the number of bytes in buffer to write.
        Throws:
        IOException - If an error occurs during writing.
      • flush

        public void flush()
                   throws IOException
        Flushes the underlying stream. This flushes only the bytes that can be compressed at the highest level.

        For deflater output streams constructed with Java 7's syncFlush parameter set to true (not yet available on Android), this first flushes all outstanding data so that it may be immediately read by its recipient. Doing so may degrade compression.

        Specified by:
        flush in interface Flushable
        Overrides:
        flush in class FilterOutputStream
        Throws:
        IOException - if an error occurs attempting to flush this stream.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 15223 / 248392446. Delta: 0.03407 с