public class ZipDataDescriptor extends Object
GeneralPurposeFlag.DATA_DESCRIPTOR
is set in the ZipFileHeader
. This can be encoded as 32-bit or 64-bit sizes depending on whether or not the
sizes overflow the 4-byte integer.Modifier and Type | Class and Description |
---|---|
static class |
ZipDataDescriptor.Builder
Builder for
ZipDataDescriptor . |
Modifier and Type | Field and Description |
---|---|
static int |
OPTIONAL_EXPECTED_SIGNATURE
optional signature at the start of the data-descriptor
|
Constructor and Description |
---|
ZipDataDescriptor(boolean zip64,
long crc32,
long compressedSize,
long uncompressedSize) |
Modifier and Type | Method and Description |
---|---|
static ZipDataDescriptor.Builder |
builder()
Make a builder for this class.
|
long |
getCompressedSize() |
long |
getCrc32() |
long |
getUncompressedSize() |
boolean |
isZip64() |
static ZipDataDescriptor |
read(RewindableInputStream inputStream,
long compressedSize,
long uncompressedSize)
Read from the input-stream.
|
void |
write(OutputStream outputStream)
Write to the output-stream.
|
public static final int OPTIONAL_EXPECTED_SIGNATURE
public ZipDataDescriptor(boolean zip64, long crc32, long compressedSize, long uncompressedSize)
public static ZipDataDescriptor.Builder builder()
public static ZipDataDescriptor read(RewindableInputStream inputStream, long compressedSize, long uncompressedSize) throws IOException
compressedSize
- Size of the compressed data which is uses to see if we need to read in a zip64 or zip32 descriptor.uncompressedSize
- Size of the uncompressed data which is uses to see if we need to read in a zip64 or zip32 descriptor.IOException
public void write(OutputStream outputStream) throws IOException
IOException
public boolean isZip64()
public long getCrc32()
public long getCompressedSize()
public long getUncompressedSize()
This documentation content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.