public class JarEntry extends Object implements Identifiable
JarEntry.| Modifier and Type | Field and Description |
|---|---|
protected List<JarEntry> |
children
Children JAR entries.
|
protected Icon |
icon
Custom JAR entry icon.
|
protected String |
id
Unique JAR entry ID.
|
protected static String |
ID_PREFIX
ID prefix.
|
protected String |
name
JAR entry name.
|
protected JarEntry |
parent
Parent JAR entry if it has one.
|
protected JarStructure |
structure
JAR structure this entry belongs to.
|
protected JarEntryType |
type
JAR entry type.
|
protected ZipEntry |
zipEntry
ZIP entry reference for this JAR entry.
|
| Constructor and Description |
|---|
JarEntry(JarStructure structure,
JarEntryType type,
String name)
Constructs new
JarEntry. |
JarEntry(JarStructure structure,
JarEntry parent,
ZipEntry zipEntry,
JarEntryType type,
String name)
Constructs new
JarEntry. |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(JarEntry child)
Adds child
JarEntry. |
boolean |
equals(Object other) |
JarEntry |
findChildByName(String name)
Returns child
JarEntry with the specfiied name or null if it cannot be found. |
JarEntry |
findChildByName(String name,
boolean recursively)
Returns child
JarEntry with the specfiied name or null if it cannot be found. |
String |
getCanonicalEntryName()
Returns
JarEntry canonical name. |
String |
getCanonicalEntryPath()
Returns
JarEntry canonical path. |
JarEntry |
getChildByName(String name)
Returns child
JarEntry with the specfiied name or null if it cannot be found. |
JarEntry |
getChildByName(String name,
boolean recursively)
Returns child
JarEntry with the specfiied name or null if it cannot be found. |
List<JarEntry> |
getChildren()
Returns copy of children
JarEntrys. |
String |
getEntryExtension()
|
Icon |
getIcon()
Returns
JarEntry icon. |
String |
getId()
Returns unique object identifier.
|
InputStream |
getInputStream()
Returns
JarEntry content InputStream. |
String |
getName()
Returns
JarEntry name. |
JarEntry |
getParent()
|
List<JarEntry> |
getPath()
|
JarEntryType |
getType()
Returns
JarEntryType. |
ZipEntry |
getZipEntry()
|
boolean |
isClassEntry(Class classType)
|
void |
removeChild(JarEntry child)
Removes child
JarEntry. |
void |
setIcon(Icon icon)
Sets custom
JarEntry icon. |
void |
setName(String name)
Sets custom
JarEntry name. |
String |
toString() |
protected static final String ID_PREFIX
@NotNull protected final JarStructure structure
@NotNull protected final JarEntryType type
public JarEntry(@NotNull JarStructure structure, @NotNull JarEntryType type, @NotNull String name)
JarEntry.structure - JarStructuretype - JarEntryTypename - JarEntry namepublic JarEntry(@NotNull JarStructure structure, @Nullable JarEntry parent, @Nullable ZipEntry zipEntry, @NotNull JarEntryType type, @NotNull String name)
JarEntry.structure - JarStructureparent - parent JarEntryzipEntry - ZipEntrytype - JarEntryTypename - JarEntry name@NotNull public String getId()
IdentifiableNotNull in futuregetId in interface Identifiable@Nullable public JarEntry getParent()
JarEntry or null if this is a JarEntryType.JAR entry@Nullable public ZipEntry getZipEntry()
ZipEntry or null if this is a JarEntryType.JAR entry@NotNull public JarEntryType getType()
JarEntryType.JarEntryTypepublic void setName(@NotNull String name)
JarEntry name.name - custom JarEntry namepublic void setIcon(@Nullable Icon icon)
JarEntry icon.icon - custom JarEntry icon@NotNull public List<JarEntry> getChildren()
JarEntrys.JarEntrys@NotNull public JarEntry getChildByName(@Nullable String name)
JarEntry with the specfiied name or null if it cannot be found.@NotNull public JarEntry getChildByName(@Nullable String name, boolean recursively)
JarEntry with the specfiied name or null if it cannot be found.@Nullable public JarEntry findChildByName(@Nullable String name)
JarEntry with the specfiied name or null if it cannot be found.@Nullable public JarEntry findChildByName(@Nullable String name, boolean recursively)
JarEntry with the specfiied name or null if it cannot be found.public void addChild(@NotNull JarEntry child)
JarEntry.child - child JarEntry to addpublic void removeChild(@NotNull JarEntry child)
JarEntry.child - child JarEntry to remove@NotNull public String getCanonicalEntryName()
JarEntry canonical name.JarEntry canonical name@NotNull public String getCanonicalEntryPath()
JarEntry canonical path.JarEntry canonical path@NotNull public InputStream getInputStream()
JarEntry content InputStream.JarEntry content InputStreamCopyright © 2020. All rights reserved.