/** {@inheritDoc} */ 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 */ public ZipShort getLocalFileDataLength() { return new ZipShort(localFileData == null ? 0 : localFileData.length); }
/** * Get the length of the local data. * @return the length of the local data */ public ZipShort getLocalFileDataLength() { return new ZipShort(localData.length); }
/** {@inheritDoc} */ public ZipShort getLocalFileDataLength() { return new ZipShort(size != null ? 2 * DWORD : 0); }
/** * Get the central data length. * If there is no central data, get the local file data length. * @return the central data length */ 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 */ public ZipShort getCentralDirectoryLength() { return centralDirectoryData == null ? getLocalFileDataLength() : new ZipShort(centralDirectoryData.length); }
/** {@inheritDoc} */ public ZipShort getCentralDirectoryLength() { if (data == null) { assembleData(); } return new ZipShort(data.length); }
/** * 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 * @since 1.1 */ 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 }