
software.coley.llzip.format.model.ZipPart Maven / Gradle / Ivy
package software.coley.llzip.format.model;
/**
* Outline of a zip section.
*
* @author Matt Coley
* @see CentralDirectoryFileHeader
* @see EndOfCentralDirectory
* @see LocalFileHeader
*/
public interface ZipPart {
/**
* @return Length of current content.
*/
long length();
/**
* @return Implementation type.
*/
PartType type();
/**
* Optional offset information.
*
* @return Offset of part in the ZIP file.
* May be {@code -1} to indicate unknown offset.
*/
long offset();
/**
* @return {@code true} when {@link #offset()} information is present.
*/
default boolean hasOffset() {
return offset() >= 0L;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy