Class GZIPFExtraRecord
java.lang.Object
org.archive.format.gzip.GZIPFExtraRecord
- All Implemented Interfaces:
GZIPConstants
-
Field Summary
Fields inherited from interface org.archive.format.gzip.GZIPConstants
BYTES_IN_INT, BYTES_IN_SHORT, GZIP_COMPRESSION_METHOD_DEFLATE, GZIP_COMPRESSION_METHOD_IDX, GZIP_FEXTRA_LENGTH_BYTES, GZIP_FEXTRA_LENGTH_IDX, GZIP_FEXTRA_NAME_BYTES, GZIP_FEXTRA_NAME_IDX, GZIP_FEXTRA_VALUE_IDX, GZIP_FEXTRA_VALUE_MAX_LENGTH, GZIP_FLAG_FCOMMENT, GZIP_FLAG_FEXTRA, GZIP_FLAG_FHCRC, GZIP_FLAG_FNAME, GZIP_FLAG_FTEXT, GZIP_FLAG_IDX, GZIP_FLAG_VALID_BITS, GZIP_FOOTER_BYTES, GZIP_MAGIC_ONE, GZIP_MAGIC_ONE_IDX, GZIP_MAGIC_TWO, GZIP_MAGIC_TWO_IDX, GZIP_MTIME_IDX, GZIP_MTIME_LENGTH, GZIP_OS_IDX, GZIP_OS_UNIX, GZIP_STATIC_FOOTER_SIZE, GZIP_STATIC_HEADER_SIZE, GZIP_XFL_IDX, LX_RECORD, LX_RECORD_VALUE, NO_BYTES_IN_STREAM, SL_RECORD -
Constructor Summary
ConstructorsConstructorDescriptionGZIPFExtraRecord(byte[] name, byte[] value) GZIPFExtraRecord(byte[] name, long intVal) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getName()byte[]getValue()intlength()booleanmatchesName(byte[] name) intread(byte[] buf, int offset) intread(InputStream is, int maxRead) voidsetValue(byte[] value) voidwriteTo(byte[] buf, int offset) voidwriteTo(OutputStream os)
-
Constructor Details
-
GZIPFExtraRecord
public GZIPFExtraRecord() -
GZIPFExtraRecord
- Throws:
GZIPFormatException
-
GZIPFExtraRecord
- Throws:
GZIPFormatException
-
-
Method Details
-
matchesName
public boolean matchesName(byte[] name) -
getName
public byte[] getName() -
getValue
public byte[] getValue() -
setValue
public void setValue(byte[] value) -
length
public int length()- Returns:
- the number of bytes used by this record: 0 - if the name is not set (invalid record), 4 - if the value is not set (name + 0-length value) 4 + value.length - if both are set (valid record, name + non-empty value)
-
writeTo
public void writeTo(byte[] buf, int offset) -
writeTo
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
GZIPFormatExceptionIOException
-