g-Eclipse
Release 1.0.0

eu.geclipse.core.util.tar
Class TarEntry

java.lang.Object
  extended by eu.geclipse.core.util.tar.TarEntry

public class TarEntry
extends java.lang.Object

An entry in a tar file, either a folder or a file.


Constructor Summary
TarEntry(byte[] header)
          Creates a new TarEntry from the given metadata block.
 
Method Summary
 IPath getPath()
          Get the file or folder path associated with this entry.
 long getSize()
          Get the size of the entry.
 boolean isDirectory()
          Asserts whether the entry is a directory.
 boolean isNull()
          Asserts whether the entry is null (end of tar marker).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TarEntry

public TarEntry(byte[] header)
         throws ProblemException
Creates a new TarEntry from the given metadata block.

Parameters:
header - A 512 bytes block which is to be parsed for tar metadata
Throws:
ProblemException - if the header could not be parsed or some unsupported feature was found
Method Detail

isNull

public boolean isNull()
Asserts whether the entry is null (end of tar marker).

Returns:
true if the entry is null

isDirectory

public boolean isDirectory()
Asserts whether the entry is a directory.

Returns:
true if the entry is a folder

getPath

public IPath getPath()
Get the file or folder path associated with this entry.

Returns:
A Path object corresponding to the entry's filename

getSize

public long getSize()
Get the size of the entry.

Returns:
The entry's size

g-Eclipse
Release 1.0.0