Class BufferedGZipOutputStream

    • Constructor Detail

      • BufferedGZipOutputStream

        public BufferedGZipOutputStream​(File archiveFile,
                                        boolean keepOutputFileIfFailure)
                                 throws IOException
        Default constructor.

        Archive will be created in ZIP32 mode and the system output buffer (buffer used for writing to filesystem resource) will be sized with ABufferedArchiveOutputStream.DEFAULT_SYSTEM_OUTPUT_BUFFER_SIZE.

        Parameters:
        archiveFile - abstract representation of the target archive file pathname
        keepOutputFileIfFailure - TRUE if the generated file needs to be kept even in case of failure of the extraction
        Throws:
        IOException - in case of stream creation failure
      • BufferedGZipOutputStream

        public BufferedGZipOutputStream​(File outputFile,
                                        int systemOutputBufferSize,
                                        boolean keepOutputFileIfFailure)
                                 throws IOException
        Alternative constructor.
        Parameters:
        outputFile - abstract representation of the final archive file pathname (see ABufferedArchiveOutputStream.getCurrentArchiveFile())
        systemOutputBufferSize - size of the intermediary buffer used to write compressed results into the system resources (e.g. final archive file(s) on the filesystem)
        keepOutputFileIfFailure - TRUE if the generated file needs to be kept even in case of failure of the extraction
        Throws:
        IOException - in case of stream creation failure
    • Method Detail

      • getBytesWritten

        public long getBytesWritten()
        Returns:
        the number of bytes written into this stream (a.k.a. the volume of uncompressed data that has been processed). If the stream is still open when this is called this will return the bytes written so far (depends on what has been passed for writing and on the buffer fill/flush cycles), otherwise (called after stream closure) it will return the final number of bytes written.