public class GZipHeader
extends java.lang.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 |
|---|---|
java.lang.String |
getComment() |
int |
getCompressionLevel() |
java.lang.String |
getFileName() |
long |
getTimestamp() |
static GZipHeader |
load(java.nio.ByteBuffer buf)
Parse the buffer.
|
static GZipHeader.Magic |
peekMagicNumber(java.nio.ByteBuffer buf) |
static GZipHeader.Trailer |
readGZipTrailer(java.nio.ByteBuffer buf) |
void |
setComment(java.lang.String comment) |
void |
setCompressionLevel(int compressionLevel) |
void |
setFileName(java.lang.String fileName) |
void |
setTimestamp(long timestamp) |
java.nio.ByteBuffer |
store() |
static java.nio.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 java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
public java.lang.String getComment()
public void setComment(java.lang.String comment)
public java.nio.ByteBuffer store()
public static GZipHeader.Magic peekMagicNumber(java.nio.ByteBuffer buf)
public static GZipHeader load(java.nio.ByteBuffer buf) throws java.util.zip.DataFormatException
java.util.zip.DataFormatExceptionpublic static GZipHeader.Trailer readGZipTrailer(java.nio.ByteBuffer buf) throws java.util.zip.DataFormatException
java.util.zip.DataFormatExceptionpublic static java.nio.ByteBuffer writeGZipTrailer(long checksum,
long bytesRead)
Copyright © 2018 Apigee Corporation. All Rights Reserved.