Package com.tccc.kos.commons.kab
Class KabEntry
java.lang.Object
com.tccc.kos.commons.kab.KabEntry
Data class that contains information about a single entry in a KAB archive file.
The fields are:
private String name; // the name of this entry private int offset; // the offset of this entry in the archive private int len; // the length of this entry, in bytes private boolean dir; // true if entry is a directory, otherwise it's a file private String user; // file owner username private String group; // file owner group name private short permissions; // Unix-style permissions
- Since:
- 1.0
- Version:
- 2022-09-28
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetFlags()getGroup()Return an input stream for the entry.intgetLen()getName()intgetPath()shortgetUser()booleanisDir()True if the entry is a directory.booleanTrue if the entry is encrypted.voidsetChildren(List<KabEntry> children) voidsetFlags(int flags) voidvoidsetKabFile(KabFile kabFile) voidsetLen(int len) voidvoidsetOffset(int offset) voidvoidSetting the path also sets the name.voidsetPermissions(short permissions) void
-
Constructor Details
-
KabEntry
public KabEntry()
-
-
Method Details
-
setPath
Setting the path also sets the name. -
getInputStream
Return an input stream for the entry.- Returns:
- the input stream for the file or null if directory
-
isDir
public boolean isDir()True if the entry is a directory. -
isEncrypted
public boolean isEncrypted()True if the entry is encrypted. -
getPath
-
getName
-
getOffset
public int getOffset() -
getLen
public int getLen() -
getFlags
public int getFlags() -
getUser
-
getGroup
-
getPermissions
public short getPermissions() -
getParent
-
getChildren
-
getKabFile
-
setName
-
setOffset
public void setOffset(int offset) -
setLen
public void setLen(int len) -
setFlags
public void setFlags(int flags) -
setUser
-
setGroup
-
setPermissions
public void setPermissions(short permissions) -
setParent
-
setChildren
-
setKabFile
-