Package com.iizix.util
Class GZOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.util.zip.DeflaterOutputStream
com.iizix.util.GZOutputStream
- All Implemented Interfaces:
- Closeable,- Flushable,- AutoCloseable
Modified version of Java's GZIPOutputStream to perform BEST compression!
- Author:
- Christopher Mindus
- Field Summary- Fields inherited from class java.util.zip.DeflaterOutputStream- buf, def- Fields inherited from class java.io.FilterOutputStream- out
- Constructor SummaryConstructorsConstructorDescriptionCreates a new output stream with the 16 KB buffer size and without flushing.
- Method Summary- Methods inherited from class java.util.zip.DeflaterOutputStream- close, deflate, flush, write- Methods inherited from class java.io.FilterOutputStream- write- Methods inherited from class java.io.OutputStream- nullOutputStream
- Constructor Details- GZOutputStreamCreates a new output stream with the 16 KB buffer size and without flushing.- Parameters:
- out- The output stream.
- Throws:
- IOException- If an I/O error has occurred.
 
 
- Method Details- writeWrites array of bytes to the compressed output stream. This method will block until all the bytes are written.- Overrides:
- writein class- DeflaterOutputStream
- Parameters:
- buf- 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.
 
- finishFinishes writing compressed data to the output stream without closing the underlying stream. Use this method when applying multiple filters in succession to the same output stream.- Overrides:
- finishin class- DeflaterOutputStream
- Throws:
- IOException- if an I/O error has occurred.