API Overview API Index Package Overview Direct link to this page
Apache Ant 1.7.1
  org.apache.tools.tar. TarEntry View Source
Author(s)
Since
Version
Serial
Hierarchy
 Object
      TarEntry
Implements
 TarConstants
Subclasses
Description
public class TarEntry
  This class represents an entry in a Tar archive.
See also:   
Constructors
private TarEntry ()
Construct an empty entry and prepares the header values.
public TarEntry (byte[] headerBuf)
  Construct an entry from an archive's header bytes.
public TarEntry (java.io.File file)
  Construct an entry for a file.
public TarEntry (java.lang.String name)
  Construct an entry with only a name.
public TarEntry (java.lang.String name, byte linkFlag)
  Construct an entry with a name an a link flag.
Methods
Hide/Show inherited methods
public boolean equals (java.lang.Object it)
  Determine if the two entries are equal.
public boolean equals (TarEntry it)
  Determine if the two entries are equal.
public TarEntry getDirectoryEntries ()
  If this entry represents a file, and the file is a directory, return an array of TarEntries for this entry's children.
public java.io.File getFile ()
  Get this entry's file.
public int getGroupId ()
  Get this entry's group id.
public java.lang.String getGroupName ()
  Get this entry's group name.
public java.lang.String getLinkName ()
  Get this entry's link name.
public int getMode ()
  Get this entry's mode.
public java.util.Date getModTime ()
  Set this entry's modification time.
public java.lang.String getName ()
  Get this entry's name.
public long getSize ()
  Get this entry's file size.
public int getUserId ()
  Get this entry's user id.
public java.lang.String getUserName ()
  Get this entry's user name.
public int hashCode ()
  Hashcodes are based on entry names.
public boolean isDescendent (TarEntry desc)
  Determine if the given entry is a descendant of this entry.
public boolean isDirectory ()
  Return whether or not this entry represents a directory.
public boolean isGNULongNameEntry ()
  Indicate if this entry is a GNU long name block
public void parseTarHeader (byte[] header)
  Parse an entry's header information from a header buffer.
public void setGroupId (int groupId)
  Set this entry's group id.
public void setGroupName (java.lang.String groupName)
  Set this entry's group name.
public void setIds (int userId, int groupId)
  Convenience method to set this entry's group and user ids.
public void setMode (int mode)
  Set the mode for this entry
public void setModTime (java.util.Date time)
  Set this entry's modification time.
public void setModTime (long time)
  Set this entry's modification time.
public void setName (java.lang.String name)
  Set this entry's name.
public void setNames (java.lang.String userName, java.lang.String groupName)
  Convenience method to set this entry's group and user names.
public void setSize (long size)
  Set this entry's file size.
public void setUserId (int userId)
  Set this entry's user id.
public void setUserName (java.lang.String userName)
  Set this entry's user name.
public void writeEntryHeader (byte[] outbuf)
  Write an entry's header information to a header buffer.
Fields
Hide/Show inherited fields
publicfinalstatic int CHKSUMLEN = "8" [Inherited From TarConstants]
The length of the checksum field in a header buffer.
publicfinalstatic int DEFAULT_DIR_MODE = "16877"
Default permissions bits for directories
publicfinalstatic int DEFAULT_FILE_MODE = "33188"
Default permissions bits for files
publicfinalstatic int DEVLEN = "8" [Inherited From TarConstants]
The length of the devices field in a header buffer.
publicfinalstatic int GIDLEN = "8" [Inherited From TarConstants]
The length of the group id field in a header buffer.
publicfinalstatic int GNAMELEN = "32" [Inherited From TarConstants]
The length of the group name field in a header buffer.
publicfinalstatic java.lang.String GNU_LONGLINK = "././@LongLink" [Inherited From TarConstants]
The namr of the GNU tar entry which contains a long name.
publicfinalstatic java.lang.String GNU_TMAGIC = "ustar " [Inherited From TarConstants]
The magic tag representing a GNU tar archive.
publicfinalstatic byte LF_BLK = "52" [Inherited From TarConstants]
Block device file type.
publicfinalstatic byte LF_CHR = "51" [Inherited From TarConstants]
Character device file type.
publicfinalstatic byte LF_CONTIG = "55" [Inherited From TarConstants]
Contiguous file type.
publicfinalstatic byte LF_DIR = "53" [Inherited From TarConstants]
Directory file type.
publicfinalstatic byte LF_FIFO = "54" [Inherited From TarConstants]
FIFO (pipe) file type.
publicfinalstatic byte LF_GNUTYPE_LONGNAME = "76" [Inherited From TarConstants]
Identifies the *next* file on the tape as having a long name.
publicfinalstatic byte LF_LINK = "49" [Inherited From TarConstants]
Link file type.
publicfinalstatic byte LF_NORMAL = "48" [Inherited From TarConstants]
Normal file type.
publicfinalstatic byte LF_OLDNORM = "0" [Inherited From TarConstants]
  LF_ constants represent the "link flag" of an entry, or more commonly, the "entry type".
publicfinalstatic byte LF_SYMLINK = "50" [Inherited From TarConstants]
Symbolic link file type.
publicfinalstatic int MAGICLEN = "8" [Inherited From TarConstants]
The length of the magic field in a header buffer.
publicfinalstatic int MAX_NAMELEN = "31"
Maximum length of a user's name in the tar file
publicfinalstatic long MAXSIZE = "8589934591" [Inherited From TarConstants]
The maximum size of a file in a tar archive (That's 11 sevens, octal).
publicfinalstatic int MILLIS_PER_SECOND = "1000"
Convert millis to seconds
publicfinalstatic int MODELEN = "8" [Inherited From TarConstants]
The length of the mode field in a header buffer.
publicfinalstatic int MODTIMELEN = "12" [Inherited From TarConstants]
The length of the modification time field in a header buffer.
publicfinalstatic int NAMELEN = "100" [Inherited From TarConstants]
The length of the name field in a header buffer.
publicfinalstatic int SIZELEN = "12" [Inherited From TarConstants]
The length of the size field in a header buffer.
publicfinalstatic java.lang.String TMAGIC = "ustar" [Inherited From TarConstants]
The magic tag representing a POSIX tar archive.
publicfinalstatic int UIDLEN = "8" [Inherited From TarConstants]
The length of the user id field in a header buffer.
publicfinalstatic int UNAMELEN = "32" [Inherited From TarConstants]
The length of the user name field in a header buffer.
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar