Package net.i2p.i2ptunnel
Class GunzipOutputStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.util.zip.InflaterOutputStream
net.i2p.i2ptunnel.GunzipOutputStream
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
public class GunzipOutputStream extends InflaterOutputStream
Gunzip implementation per
RFC 1952, reusing
java's standard CRC32 and Inflater and InflaterOutputStream implementations.
Note that the underlying InflaterOutputStream cannot be reused after close(),
so we don't have a Reusable version of this.
Modified from net.i2p.util.ResettableGZIPInputStream to use Java 6 InflaterOutputstream
- Since:
- 0.9.21
-
Field Summary
-
Constructor Summary
Constructors Constructor Description GunzipOutputStream(OutputStream uncompressedStream)
Build a new Gunzip stream -
Method Summary
Modifier and Type Method Description void
close()
boolean
getFinished()
Inflater statisticlong
getRemaining()
Inflater statisticlong
getTotalExpanded()
Inflater statisticlong
getTotalRead()
Inflater statisticString
toString()
void
write(byte[] buf)
void
write(byte[] buf, int off, int len)
void
write(int b)
-
Constructor Details
-
GunzipOutputStream
Build a new Gunzip stream- Throws:
IOException
-
-
Method Details
-
write
- Overrides:
write
in classInflaterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classFilterOutputStream
- Throws:
IOException
-
write
- Overrides:
write
in classInflaterOutputStream
- Throws:
IOException
-
getTotalRead
public long getTotalRead()Inflater statistic -
getTotalExpanded
public long getTotalExpanded()Inflater statistic -
getRemaining
public long getRemaining()Inflater statistic -
getFinished
public boolean getFinished()Inflater statistic -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInflaterOutputStream
- Throws:
IOException
-
toString
-