Class DefaultEscherRecordFactory

java.lang.Object
org.apache.poi.ddf.DefaultEscherRecordFactory
All Implemented Interfaces:
EscherRecordFactory
Direct Known Subclasses:
HSLFEscherRecordFactory

public class DefaultEscherRecordFactory extends Object implements EscherRecordFactory
Generates escher records when provided the byte array containing those records.
See Also:
  • Constructor Details

    • DefaultEscherRecordFactory

      public DefaultEscherRecordFactory()
      Creates an instance of the escher record factory
  • Method Details

    • createRecord

      public EscherRecord createRecord(byte[] data, int offset)
      Description copied from interface: EscherRecordFactory
      Generates an escher record including any children contained under that record. An exception is thrown if the record could not be generated.
      Specified by:
      createRecord in interface EscherRecordFactory
      Parameters:
      data - The byte array containing the records
      offset - The starting offset into the byte array
      Returns:
      The generated escher record
    • recordsToMap

      protected static Map<Short,Constructor<? extends EscherRecord>> recordsToMap(Class<?>[] recClasses)
      Converts from a list of classes into a map that contains the record id as the key and the Constructor in the value part of the map. It does this by using reflection to look up the RECORD_ID field then using reflection again to find a reference to the constructor.
      Parameters:
      recClasses - The records to convert
      Returns:
      The map containing the id/constructor pairs.
    • isContainer

      public static boolean isContainer(short options, short recordId)