@Override public ZipShort getCentralDirectoryLength() { return new ZipShort((size != null ? DWORD : 0) + (compressedSize != null ? DWORD : 0) + (relativeHeaderOffset != null ? DWORD : 0) + (diskStart != null ? WORD : 0)); }
/** * Length of the complete extra field in the local file data. * * @return The LocalFileDataLength value */ @Override public ZipShort getLocalFileDataLength() { return new ZipShort(localFileData == null ? 0 : localFileData.length); }
@Override public ZipShort getLocalFileDataLength() { return new ZipShort(BASE_SIZE + padding); }
/** * Get the length of the local data. * * @return the length of the local data */ @Override public ZipShort getLocalFileDataLength() { return new ZipShort(localData != null ? localData.length : 0); }
/** * Get the length of the local data. * @return the length of the local data */ @Override public ZipShort getLocalFileDataLength() { return new ZipShort(localData != null ? localData.length : 0); }
@Override public ZipShort getLocalFileDataLength() { return new ZipShort(size != null ? 2 * DWORD : 0); }
/** * Length of the extra field in the local file data - without * Header-ID or length specifier. * * @return a <code>ZipShort</code> for the length of the data of this extra field */ @Override public ZipShort getLocalFileDataLength() { return new ZipShort(4 /* reserved */ + 2 /* Tag#1 */ + 2 /* Size#1 */ + 3 * 8 /* time values */); }
/** * Length of the extra field in the local file data - without * Header-ID or length specifier. * * @return a <code>ZipShort</code> for the length of the data of this extra field */ @Override public ZipShort getLocalFileDataLength() { return new ZipShort(1 + (bit0_modifyTimePresent ? 4 : 0) + (bit1_accessTimePresent && accessTime != null ? 4 : 0) + (bit2_createTimePresent && createTime != null ? 4 : 0) ); }
@Override public ZipShort getCentralDirectoryLength() { return new ZipShort(BASE_SIZE); }
public X0016_CertificateIdForCentralDirectory() { super(new ZipShort(0x0016)); }
public X0017_StrongEncryptionHeader() { super(new ZipShort(0x0017)); }
public X0014_X509Certificates() { super(new ZipShort(0x0014)); }
public X0019_EncryptionRecipientCertificateList() { super(new ZipShort(0x0019)); }
public X0015_CertificateIdForFile() { super(new ZipShort(0x0015)); }
@Override public ZipShort getCentralDirectoryLength() { if (data == null) { assembleData(); } return new ZipShort(data != null ? data.length : 0); }
/** * Get the central data length. * If there is no central data, get the local file data length. * @return the central data length */ @Override public ZipShort getCentralDirectoryLength() { if (centralData != null) { return new ZipShort(centralData.length); } return getLocalFileDataLength(); }
/** * Length of the complete extra field in the central directory. * * @return The CentralDirectoryLength value */ @Override public ZipShort getCentralDirectoryLength() { return centralDirectoryData == null ? getLocalFileDataLength() : new ZipShort(centralDirectoryData.length); }
/** * Get the central data length. If there is no central data, get the local * file data length. * * @return the central data length */ @Override public ZipShort getCentralDirectoryLength() { if (centralData != null) { return new ZipShort(centralData.length); } return getLocalFileDataLength(); }
/** * Length of the extra field in the local file data - without * Header-ID or length specifier. * @return a <code>ZipShort</code> for the length of the data of this extra field */ @Override public ZipShort getLocalFileDataLength() { return new ZipShort(WORD // CRC + 2 // Mode + WORD // SizDev + 2 // UID + 2 // GID + getLinkedFile().getBytes().length); // Uses default charset - see class Javadoc }
private void readTimeAttr(final byte[] data, int offset, final int length) { if (length >= 2 + 3 * 8) { final ZipShort tagValueLength = new ZipShort(data, offset); if (TIME_ATTR_SIZE.equals(tagValueLength)) { offset += 2; modifyTime = new ZipEightByteInteger(data, offset); offset += 8; accessTime = new ZipEightByteInteger(data, offset); offset += 8; createTime = new ZipEightByteInteger(data, offset); } } }