public class GZipInflatingOutputStream extends java.io.OutputStream implements OutputStreamWrapper
| Modifier and Type | Field and Description |
|---|---|
private int |
BUFFER_SIZE |
private java.util.zip.CRC32 |
crc |
private int |
expectedHeaderLength |
private static int |
FCOMMENT |
private static int |
FEXTRA |
private static int |
FHCRC |
private boolean |
finishedHeader |
private static int |
FNAME |
private static int |
FTEXT |
static int |
GZIP_MAGIC |
private byte[] |
headerBytes |
private int |
headerFlag |
private int |
headerLength |
private int |
headerOffset |
private byte[] |
inflatedBytes |
private java.util.zip.Inflater |
inflater |
private java.io.OutputStream |
outputStream |
private byte[] |
trailerBytes |
private int |
trailerOffset |
| Constructor and Description |
|---|
GZipInflatingOutputStream(java.io.OutputStream outputStream) |
| Modifier and Type | Method and Description |
|---|---|
private long |
bytesToInt(byte[] b,
int offset) |
private int |
bytesToShort(byte[] b,
int offset) |
void |
close() |
void |
flush() |
java.io.OutputStream |
getWrappedOutputStream() |
private void |
inflateData() |
private void |
parseHeader(byte[] b,
int off,
int len) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int value) |
public static final int GZIP_MAGIC
private static final int FTEXT
private static final int FHCRC
private static final int FEXTRA
private static final int FNAME
private static final int FCOMMENT
private int BUFFER_SIZE
private java.util.zip.Inflater inflater
private java.util.zip.CRC32 crc
private java.io.OutputStream outputStream
private byte[] inflatedBytes
private boolean finishedHeader
private byte[] headerBytes
private int expectedHeaderLength
private int headerLength
private int headerOffset
private int headerFlag
private byte[] trailerBytes
private int trailerOffset
public GZipInflatingOutputStream(java.io.OutputStream outputStream)
throws java.io.IOException
java.io.IOExceptionprivate void inflateData()
throws java.io.IOException
java.io.IOExceptionprivate void parseHeader(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic void write(int value)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.OutputStreamjava.io.IOExceptionprivate int bytesToShort(byte[] b,
int offset)
private long bytesToInt(byte[] b,
int offset)
public java.io.OutputStream getWrappedOutputStream()
getWrappedOutputStream in interface OutputStreamWrapper