Package com.adobe.internal.mac.resource
Class ResourceParser.ResourceEntry
java.lang.Object
com.adobe.internal.mac.resource.ResourceParser.ResourceEntry
- Enclosing class:
ResourceParser
Information about a specific resource. This information is used internally for parsing and is
also given to the callback resource type handlers.
-
Method Summary
Modifier and TypeMethodDescriptionbyteGet the attributes for this resource.intGet the offset to the resource data for this resource.intgetID()Get the id of this resource.getName()Get the name of this resource.byte[]Get the bytes of the resource name.intGet the offset to the name data for this resource.intGet the script code used to turn the name bytes for this resource into a name string.byte[]getType()Get the type of this resource.toString()Put thisResourceEntryinto a string format for debugging or logging purposes.
-
Method Details
-
getDataOffset
public int getDataOffset()Get the offset to the resource data for this resource.- Returns:
- the offset of the data for this resource from the beginning of the resource table
-
getNameOffset
public int getNameOffset()Get the offset to the name data for this resource.- Returns:
- the offset to the name of this resource from the beginning of the name table; -1 if no name entry
-
toString
Put thisResourceEntryinto a string format for debugging or logging purposes. -
getType
public byte[] getType()Get the type of this resource. The type is a 4 byte identifier unique to a specific resource type.- Returns:
- the type of this resource
-
getAttributes
public byte getAttributes()Get the attributes for this resource.- Returns:
- the bit flags containing the attributes
-
getNameBytes
public byte[] getNameBytes()Get the bytes of the resource name. These are the raw bytes exactly as encoded in the name table.- Returns:
- the raw bytes of the resource name
-
getName
Get the name of this resource. This name is interpreted from the name bytes by using heuristics to guess the encoding. If no guess was possible or it was not possible to decode those bytes this will return null.- Returns:
- the resource name
-
getScriptCode
public int getScriptCode()Get the script code used to turn the name bytes for this resource into a name string.- Returns:
- the script code used for the name of this resource
-
getID
public int getID()Get the id of this resource.- Returns:
- the id of this resource
-