public class GZipHeader extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GZipHeader.Magic |
static class |
GZipHeader.Trailer |
| Modifier and Type | Field and Description |
|---|---|
static byte |
BEST_COMPRESSION |
static byte |
FAST_COMPRESSION |
static int |
FCOMMENT |
static int |
FHCRC |
static int |
FHEXTRA |
static int |
FNAME |
static int |
HEADER_SIZE |
static byte |
MAGIC_1 |
static byte |
MAGIC_2 |
static byte |
METHOD_INFLATE |
static int |
TRAILER_SIZE |
static byte |
UNIX |
| Constructor and Description |
|---|
GZipHeader() |
| Modifier and Type | Method and Description |
|---|---|
String |
getComment() |
int |
getCompressionLevel() |
String |
getFileName() |
long |
getTimestamp() |
static GZipHeader |
load(ByteBuffer buf)
Parse the buffer.
|
static GZipHeader.Magic |
peekMagicNumber(ByteBuffer buf) |
static GZipHeader.Trailer |
readGZipTrailer(ByteBuffer buf) |
void |
setComment(String comment) |
void |
setCompressionLevel(int compressionLevel) |
void |
setFileName(String fileName) |
void |
setTimestamp(long timestamp) |
ByteBuffer |
store() |
static ByteBuffer |
writeGZipTrailer(long checksum,
long bytesRead) |
public static final int HEADER_SIZE
public static final int TRAILER_SIZE
public static final byte MAGIC_1
public static final byte MAGIC_2
public static final byte METHOD_INFLATE
public static final byte UNIX
public static final byte BEST_COMPRESSION
public static final byte FAST_COMPRESSION
public static final int FHCRC
public static final int FHEXTRA
public static final int FNAME
public static final int FCOMMENT
public long getTimestamp()
public void setTimestamp(long timestamp)
public int getCompressionLevel()
public void setCompressionLevel(int compressionLevel)
public String getFileName()
public void setFileName(String fileName)
public String getComment()
public void setComment(String comment)
public ByteBuffer store()
public static GZipHeader.Magic peekMagicNumber(ByteBuffer buf)
public static GZipHeader load(ByteBuffer buf) throws DataFormatException
DataFormatExceptionpublic static GZipHeader.Trailer readGZipTrailer(ByteBuffer buf) throws DataFormatException
DataFormatExceptionpublic static ByteBuffer writeGZipTrailer(long checksum, long bytesRead)
Copyright © 2016 Apigee Corporation. All Rights Reserved.