org.at4j.tar
Class TarDirectoryEntry
java.lang.Object
org.at4j.archive.AbstractArchiveEntry<TarEntry,TarDirectoryEntry>
org.at4j.tar.TarEntry
org.at4j.tar.TarDirectoryEntry
- All Implemented Interfaces:
- ArchiveDirectoryEntry<TarEntry,TarDirectoryEntry>, ArchiveEntry<TarEntry,TarDirectoryEntry>, Lockable, ReadLockable, Named
- Direct Known Subclasses:
- UstarDirectoryEntry
public class TarDirectoryEntry
- extends TarEntry
- implements ArchiveDirectoryEntry<TarEntry,TarDirectoryEntry>
This object represents a Unix v7 Tar directory entry.
Tar entry objects are always immutable.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
TarFileEntry
,
TarSymbolicLinkEntry
Method Summary |
Map<String,TarEntry> |
getChildEntries()
Get a read only map containing this directory entry's child entries,
keyed under their (file) names. |
protected UnixEntityMode |
getDefaultEntityMode()
Subclasses implement this to return the default Unix entity mode if none
is set in the Tar file. |
boolean |
isEmpty()
Is this directory entry empty? (I.e: does it not contain any child
entries?) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getDefaultEntityMode
protected UnixEntityMode getDefaultEntityMode()
- Description copied from class:
TarEntry
- Subclasses implement this to return the default Unix entity mode if none
is set in the Tar file. This is called from the constructor.
- Specified by:
getDefaultEntityMode
in class TarEntry
- Returns:
- The default entity mode for the entry type.
getChildEntries
public Map<String,TarEntry> getChildEntries()
- Get a read only map containing this directory entry's child entries,
keyed under their (file) names.
- Specified by:
getChildEntries
in interface ArchiveDirectoryEntry<TarEntry,TarDirectoryEntry>
- Returns:
- A read only map containing this directory entry's child entries.
This may be empty, but never
null
.
isEmpty
public boolean isEmpty()
- Description copied from interface:
ArchiveDirectoryEntry
- Is this directory entry empty? (I.e: does it not contain any child
entries?)
- Specified by:
isEmpty
in interface ArchiveDirectoryEntry<TarEntry,TarDirectoryEntry>
- Returns:
true
if the directory entry is empty.