Class ResourceParser.ResourceEntry

java.lang.Object
com.adobe.internal.mac.resource.ResourceParser.ResourceEntry
Enclosing class:
ResourceParser

public static class ResourceParser.ResourceEntry extends Object
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 Type
    Method
    Description
    byte
    Get the attributes for this resource.
    int
    Get the offset to the resource data for this resource.
    int
    Get the id of this resource.
    Get the name of this resource.
    byte[]
    Get the bytes of the resource name.
    int
    Get the offset to the name data for this resource.
    int
    Get the script code used to turn the name bytes for this resource into a name string.
    byte[]
    Get the type of this resource.
    Put this ResourceEntry into a string format for debugging or logging purposes.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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

      public String toString()
      Put this ResourceEntry into a string format for debugging or logging purposes.
      Overrides:
      toString in class Object
      Returns:
      the string representation
    • 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

      public String 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