public class GzipEntry extends java.lang.Object implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
bEof
End of uncompressed file status.
|
boolean |
bFhCrc
CRC16 Calculate(d).
|
boolean |
bFText
Is compressed data ASCII.
|
protected boolean |
bIsCompliant
Is this entry compliant ie.
|
short |
cm
Compression mode.
|
int |
comp_crc16
Computed CRC16.
|
int |
comp_crc32
Computed CRC32.
|
int |
comp_isize
Computed ISize.
|
long |
compressed_size
Compressed size.
|
long |
consumed
Bytes consumed while validating this entry.
|
java.lang.Integer |
crc16
Optional CRC16 if present.
|
int |
crc32
Trailing CRC32.
|
java.util.Date |
date
Date converted.
|
Diagnostics |
diagnostics
Validation errors and warnings.
|
byte[] |
extraBytes
Optional FEXTRA data.
|
java.util.List<GzipExtraData> |
extraData
List of FEXTRA data container objects.
|
java.lang.String |
fcomment
Optional FCOMMENT in iso-8859-1 format (new lines should be LF only).
|
short |
flg
Flags.
|
java.lang.String |
fname
Optional FNAME in iso-8859-1 format.
|
protected java.io.InputStream |
in
Input stream to read uncompressed data.
|
int |
isize
Trailing uncompressed size modulo 2^32.
|
int |
magic
Leading magic.
|
long |
mtime
Date in seconds.
|
short |
os
Operating system.
|
protected java.io.OutputStream |
out
Output stream to write compressed data.
|
protected GzipReader |
reader
GZip reader responsible for reading this entry.
|
long |
startOffset
Starting offset of this entry in the input stream from whence it came.
|
long |
uncompressed_size
Uncompressed size.
|
static int |
WRITE_FROM_BUFFER_SIZE
Size of buffer used in writeFrom().
|
protected GzipWriter |
writer
GZip writer responsible for writing this entry.
|
short |
xfl
Compression flags.
|
java.lang.Integer |
xlen
Optional FEXTRA XLEN values.
|
| Constructor and Description |
|---|
GzipEntry()
Construct GZip Entry object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Release resources associated with this record.
|
java.io.InputStream |
getInputStream()
Returns an input stream which must be used to read compressed data
after it has been uncompressed or null, if the entry is being written.
|
java.io.OutputStream |
getOutputStream()
Returns an output stream which can be used to compress data or null,
if the entry is being read.
|
long |
getStartOffset()
Returns this entry's offset relative to the start of the input stream.
|
boolean |
isCompliant()
Returns a boolean indicating the ISO compliance status of this record.
|
java.lang.String |
toString() |
void |
writeFrom(java.io.InputStream in)
Read from input stream and write compressed data on output stream.
|
public static final int WRITE_FROM_BUFFER_SIZE
protected boolean bIsCompliant
public long startOffset
public long consumed
public int magic
public short cm
public short flg
public long mtime
public java.util.Date date
public short xfl
public short os
public boolean bFText
public java.lang.Integer xlen
public byte[] extraBytes
public java.util.List<GzipExtraData> extraData
public java.lang.String fname
public java.lang.String fcomment
public java.lang.Integer crc16
public int crc32
public int isize
public boolean bFhCrc
public int comp_crc16
public int comp_crc32
public int comp_isize
public long uncompressed_size
public long compressed_size
protected java.io.InputStream in
protected java.io.OutputStream out
protected GzipReader reader
protected GzipWriter writer
protected boolean bEof
public final Diagnostics diagnostics
public GzipEntry()
public void close() throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException - if an I/O error occurs while closing entrypublic boolean isCompliant()
public long getStartOffset()
public java.io.InputStream getInputStream()
public java.io.OutputStream getOutputStream()
public void writeFrom(java.io.InputStream in) throws java.io.IOException
in - input stream with uncompressed datajava.io.IOException - if an I/O error occurs while transferringpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2011–2023. All rights reserved.