org.at4j.archive
Interface ArchiveEntry<T extends ArchiveEntry<T,U>,U extends ArchiveDirectoryEntry<T,U>>

Type Parameters:
T - The type of entries in the archive.
U - The type of directory entries in the archive.
All Superinterfaces:
Lockable, Named, ReadLockable
All Known Subinterfaces:
ArchiveDirectoryEntry<T,U>, ArchiveFileEntry<T,U>, ArchiveSymbolicLinkEntry<T,U>, PaxEntry, UstarEntry
All Known Implementing Classes:
AbstractArchiveEntry, PaxDirectoryEntry, PaxFileEntry, PaxSymbolicLinkEntry, TarDirectoryEntry, TarEntry, TarFileEntry, TarSymbolicLinkEntry, UstarDirectoryEntry, UstarFileEntry, UstarSymbolicLinkEntry, ZipDirectoryEntry, ZipEntry, ZipFileEntry, ZipSymbolicLinkEntry

public interface ArchiveEntry<T extends ArchiveEntry<T,U>,U extends ArchiveDirectoryEntry<T,U>>
extends Named

This interface defines a generic entry in an Archive, i.e. a file, a directory or some other kind of entry.

Entry objects are created when an archive object (e.g. a ZipFile or a TarFile) is created. Clients never have to create any entry objects.

Entry objects are always immutable.

Since:
1.0
Author:
Karl Gustafsson

Method Summary
 AbsoluteLocation getLocation()
          Get the location of the entry in the archive.
 U getParent()
          Get the parent directory entry for this entry.
 
Methods inherited from interface org.entityfs.Named
getName
 
Methods inherited from interface org.entityfs.lock.ReadLockable
getReadLock, isReadLockedByCurrentThread, lockForReading
 

Method Detail

getLocation

AbsoluteLocation getLocation()
Get the location of the entry in the archive.

Returns:
The entry's location.

getParent

U getParent()
Get the parent directory entry for this entry. If this entry is the archive's root directory, this method returns null.

Returns:
The parent directory entry for this entry, or null if this entry is the archive's root directory.