Class NativeSignaturePackageEntry
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.sig.NativeSignaturePackageEntry
Represents a signature package available through the
NativeSignatureDBManager. The
corresponding signatures are not necessarily loaded in memory (see
isLoadedInMemory().
The entry also stores signatures intended to be written into the package, see
getSignatureToWrite().
Notes: once loaded in memory, the signatures are not stored in this class, but in an internal
storage of the NativeSignatureDBManager.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSignature package availability status. -
Constructor Summary
ConstructorsConstructorDescriptionNativeSignaturePackageEntry(File file, NativeSignaturePackageMetadata metadata) Create a signature package entry. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a signature to be written into the package.voidClear the signatures queued for writing into this package.voidDecrement the number of analyses using this package in memory.getFile()Get the package file.Get the package metadata.Retrieve the signatures that should be added to the package.longgetSize()Get the package file size in bytes.Get the package status.voidIncrement the number of analyses using this package in memory.booleanisActive()Determine whether this package entry is active.booleanDetermine whether the package signatures are loaded in memory.booleanReturns true if the package was created by a user, false if it is an official PNF Software package.voidSet the package status.toString()
-
Constructor Details
-
NativeSignaturePackageEntry
Create a signature package entry.- Parameters:
file- package filemetadata- package metadata
-
-
Method Details
-
getSize
public long getSize()Get the package file size in bytes.- Returns:
- package file size
-
getStatus
Get the package status.- Returns:
- package status
-
setStatus
Set the package status.- Parameters:
status- package status
-
isActive
public boolean isActive()Determine whether this package entry is active.- Returns:
- true if the package is active
-
isLoadedInMemory
public boolean isLoadedInMemory()Determine whether the package signatures are loaded in memory.- Returns:
- true if the signatures of this package are loaded in memory, false otherwise
-
incrementOpenHandle
public void incrementOpenHandle()Increment the number of analyses using this package in memory. -
decrementOpenHandle
public void decrementOpenHandle()Decrement the number of analyses using this package in memory. -
getFile
Get the package file.- Returns:
- package file
-
getMetadata
Get the package metadata.- Returns:
- package metadata
-
isUserCreated
public boolean isUserCreated()Returns true if the package was created by a user, false if it is an official PNF Software package.- Returns:
- true if this package is user-created
-
clearSignaturesToWrite
public void clearSignaturesToWrite()Clear the signatures queued for writing into this package. -
addSignatureToWrite
Add a signature to be written into the package.- Parameters:
sig- signature to write
-
getSignatureToWrite
Retrieve the signatures that should be added to the package.- Returns:
- list of signatures, possibly null
-
toString
-