public class TarEntry extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
file |
protected TarHeader |
header |
Constructor and Description |
---|
TarEntry(byte[] headerBuf) |
TarEntry(String file,
String entryName) |
Modifier and Type | Method and Description |
---|---|
long |
computeCheckSum(byte[] buf)
Calculate checksum
|
boolean |
equals(TarEntry it) |
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() |
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(Date time) |
void |
setModTime(long 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
|
public boolean equals(TarEntry it)
public boolean isDescendent(TarEntry desc)
public TarHeader getHeader()
public String getName()
public void setName(String name)
public int getUserId()
public void setUserId(int userId)
public int getGroupId()
public void setGroupId(int groupId)
public String getUserName()
public void setUserName(String userName)
public String getGroupName()
public void setGroupName(String groupName)
public void setIds(int userId, int groupId)
public void setModTime(long time)
public void setModTime(Date time)
public Date getModTime()
public String getFile()
public long getSize()
public void setSize(long size)
public boolean isDirectory()
public void extractTarHeader(String entryName)
entryName
- public long computeCheckSum(byte[] buf)
buf
- public void writeEntryHeader(byte[] outbuf)
outbuf
- public void parseTarHeader(byte[] bh)
header
- bh
-