org.at4j.zip
Class ZipSymbolicLinkEntry
java.lang.Object
org.at4j.archive.AbstractArchiveEntry<ZipEntry,ZipDirectoryEntry>
org.at4j.zip.ZipEntry
org.at4j.zip.ZipSymbolicLinkEntry
- All Implemented Interfaces:
- ArchiveEntry<ZipEntry,ZipDirectoryEntry>, ArchiveSymbolicLinkEntry<ZipEntry,ZipDirectoryEntry>, Lockable, ReadLockable, Named
public class ZipSymbolicLinkEntry
- extends ZipEntry
- implements ArchiveSymbolicLinkEntry<ZipEntry,ZipDirectoryEntry>
This object represents a symbolic link entry in a Zip archive. In addition to
the properties inherited from ZipEntry
, a symbolic link has a link
target and a CRC 32 checksum calculated on the link value.
Zip entries are always immutable.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
ZipDirectoryEntry
,
ZipFileEntry
Methods inherited from class org.at4j.zip.ZipEntry |
getComment, getDiskNumberStart, getExternalFileAttributes, getExtraField, getExtraFields, getGeneralPurposeBitFlags, getLastModified, getVersionNeededToExtract, getVersionUsedToCreate, isEncrypted, isStrongEncryption |
ZipSymbolicLinkEntry
public ZipSymbolicLinkEntry(ZipEntryCollaborator collaborator,
ZipEntryCentralFileHeaderData zecd,
ZipEntryLocalFileHeaderData zeld,
Charset cs)
- Create a symbolic link entry.
- Parameters:
collaborator
- The parent Zip archive's entry collaborator.zecd
- Data parsed from the Zip entry's central directory record.zeld
- Data parsed from the Zip entry's local header.cs
- The charset to use when decoding the link.
getLinkTarget
public EntityLocation<?> getLinkTarget()
- Get the symbolic link's target. This is either an
AbsoluteLocation
or a
RelativeLocation
.
- Specified by:
getLinkTarget
in interface ArchiveSymbolicLinkEntry<ZipEntry,ZipDirectoryEntry>
- Returns:
- The symbolic link's target.
getCrc32
public UnsignedInteger getCrc32()
- Get the CRC 32 checksum computed over the link target location.
- Returns:
- The CRC32 checksum.
toString
public String toString()
- Overrides:
toString
in class Object