This class represents an entry in a Tar archive. It consists of the entry's
header, as well as the entry's File. Entries can be instantiated in one of
three ways, depending on how they are to be used.
TarEntries that are created from the header bytes read from an archive are
instantiated with the TarEntry( byte[] ) constructor. These entries will be
used when extracting from or listing the contents of an archive. These
entries have their header filled in using the header bytes. They also set the
File to null, since they reference an archive entry not a file.
TarEntries that are created from Files that are to be written into an archive
are instantiated with the TarEntry( File ) constructor. These entries have
their header filled in using the File's information. They also keep a
reference to the File for convenience when writing entries.
Finally, TarEntries can be constructed from nothing but a name. This allows
the programmer to construct the entry by hand, for instance when only an
InputStream is available for writing to the archive, and the header
information is constructed from other information. In this case the header
fields are set to defaults and the File is set to null.
Construct an entry with only a name. This allows the programmer to
construct the entry's header "by hand". File is set to null.
Parameters: name - the name of the entry
Construct an entry for a file. File is set to file, and the header is
constructed from information from the file.
Parameters: file - The file that the entry represents.
Determine if the two entries are equal. Equality is determined by the
header names being equal.
Parameters: other - Entry to be checked for equality. True if the entries are equal.
If this entry represents a file, and the file is a directory, return an
array of TarEntries for this entry's children.
An array of TarEntry's for this entry's children.
Determine if the given entry is a descendant of this entry. Descendancy
is determined by the name of the descendant starting with this entry's
name.
Parameters: desc - Entry to be checked as a descendent of True if entry is a descendant of