# Class TarEntry

java.lang.Object
com.codename1.io.tar.TarEntry

public class TarEntry extends java.lang.Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected String`
  `file`
  `protected TarHeader`
  `header`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TarEntry(byte[] headerBuf)`
  `TarEntry(String file, String entryName)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `computeCheckSum(byte[] buf)`
  Calculate checksum
  `boolean`
  `equals(TarEntry it)`
  `boolean`
  `equals(java.lang.Object obj)`
  `void`
  `extractTarHeader(String entryName)`
  Extract header from File
  `String`
  `getFile()`
  `int`
  `getGroupId()`
  `String`
  `getGroupName()`
  `TarHeader`
  `getHeader()`
  `Date`
  `getModTime()`
  `String`
  `getName()`
  `long`
  `getSize()`
  `int`
  `getUserId()`
  `String`
  `getUserName()`
  `int`
  `hashCode()`
  `boolean`
  `isDescendent(TarEntry desc)`
  `boolean`
  `isDirectory()`
  Checks if the org.xeustechnologies.jtar entry is a directory
  `void`
  `parseTarHeader(byte[] bh)`
  Parses the tar header to the byte buffer
  `void`
  `setGroupId(int groupId)`
  `void`
  `setGroupName(String groupName)`
  `void`
  `setIds(int userId, int groupId)`
  `void`
  `setModTime(long time)`
  `void`
  `setModTime(Date time)`
  `void`
  `setName(String name)`
  `void`
  `setSize(long size)`
  `void`
  `setUserId(int userId)`
  `void`
  `setUserName(String userName)`
  `void`
  `writeEntryHeader(byte[] outbuf)`
  Writes the header to the byte buffer

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### file

    protected String file

  - ### header

    protected TarHeader header

- ## Constructor Details

  - ### TarEntry

    public TarEntry(String file, String entryName)

  - ### TarEntry

    public TarEntry(byte[] headerBuf)

- ## Method Details

  - ### equals

    public boolean equals(TarEntry it)

  - ### equals

    public boolean equals(java.lang.Object obj)
    Overrides:
      `equals` in class `java.lang.Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `java.lang.Object`

  - ### isDescendent

    public boolean isDescendent(TarEntry desc)

  - ### getHeader

    public TarHeader getHeader()

  - ### getName

    public String getName()

  - ### setName

    public void setName(String name)

  - ### getUserId

    public int getUserId()

  - ### setUserId

    public void setUserId(int userId)

  - ### getGroupId

    public int getGroupId()

  - ### setGroupId

    public void setGroupId(int groupId)

  - ### getUserName

    public String getUserName()

  - ### setUserName

    public void setUserName(String userName)

  - ### getGroupName

    public String getGroupName()

  - ### setGroupName

    public void setGroupName(String groupName)

  - ### setIds

    public void setIds(int userId, int groupId)

  - ### getModTime

    public Date getModTime()

  - ### setModTime

    public void setModTime(long time)

  - ### setModTime

    public void setModTime(Date time)

  - ### getFile

    public String getFile()

  - ### getSize

    public long getSize()

  - ### setSize

    public void setSize(long size)

  - ### isDirectory

    public boolean isDirectory()
    Checks if the org.xeustechnologies.jtar entry is a directory

  - ### extractTarHeader

    public void extractTarHeader(String entryName)

    Extract header from File

    ###### Parameters

    - `entryName`

  - ### computeCheckSum

    public long computeCheckSum(byte[] buf)

    Calculate checksum

    ###### Parameters

    - `buf`

  - ### writeEntryHeader

    public void writeEntryHeader(byte[] outbuf)

    Writes the header to the byte buffer

    ###### Parameters

    - `outbuf`

  - ### parseTarHeader

    public void parseTarHeader(byte[] bh)

    Parses the tar header to the byte buffer

    ###### Parameters

    - `header`

    - `bh`