Class X3fParser

  • Direct Known Subclasses:
    X3fParserRecovery, X3fParserStandard

    public abstract class X3fParser
    extends Object
    This class is an abstract base class for X3F parser classes. It encapsulates constant declarations and utility methods needed by all X3F parser implementations.
    • Field Detail

      • FOVB_ID_SECTION_DIRECTORY

        protected static final String FOVB_ID_SECTION_DIRECTORY
        Directory section identifier.
        See Also:
        Constant Field Values
      • FOVB_ID_SECTION_PROPERTY

        protected static final String FOVB_ID_SECTION_PROPERTY
        Property section identifier.
        See Also:
        Constant Field Values
      • FOVB_ID_SECTION_IMAGE

        protected static final String FOVB_ID_SECTION_IMAGE
        Image data section identifier.
        See Also:
        Constant Field Values
      • DATA_SUBSECTION_TYPE_PROP

        protected static final String DATA_SUBSECTION_TYPE_PROP
        Data subsection type identifier.
        See Also:
        Constant Field Values
      • DATA_SUBSECTION_TYPE_IMAG

        protected static final String DATA_SUBSECTION_TYPE_IMAG
        Data subsection type identifier.
        See Also:
        Constant Field Values
      • DATA_SUBSECTION_TYPE_IMA2

        protected static final String DATA_SUBSECTION_TYPE_IMA2
        Data subsection type identifier.
        See Also:
        Constant Field Values
      • x3fData

        protected final X3fData x3fData
        The data structure to be filled with the parser result.
    • Constructor Detail

      • X3fParser

        protected X3fParser​(RandomAccessData data)
        Constructor identifying and reading the file type and header.
        Parameters:
        data - the FOVb data to parse
      • X3fParser

        protected X3fParser​(RandomAccessData data,
                            boolean skipFileType,
                            long offsetEmbedded)
        Constructor identifying and reading the file header.
        Parameters:
        data - the data source to read from
        skipFileType - true, if it is assumed, that the file type has already been checked before, false to have it checked
        offsetEmbedded - an offset within a surrounding file in which this FOVb is embedded
    • Method Detail

      • readX3fDirectory

        protected abstract boolean readX3fDirectory​(RandomAccessData data)
        Reads or reconstructs an X3fDirectory.
        Parameters:
        data - the X3F data to parse
        Returns:
        true, if an X3fDirectory could be constructed successfully