- java.lang.Object
-
- de.bernd_michaely.x3f.types.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 Summary
Fields Modifier and Type Field Description protected static String
DATA_SUBSECTION_TYPE_IMA2
Data subsection type identifier.protected static String
DATA_SUBSECTION_TYPE_IMAG
Data subsection type identifier.protected static String
DATA_SUBSECTION_TYPE_PROP
Data subsection type identifier.protected static String
FOVB_ID_FILE_TYPE
File type identifier.protected static String
FOVB_ID_SECTION_DIRECTORY
Directory section identifier.protected static String
FOVB_ID_SECTION_IMAGE
Image data section identifier.protected static String
FOVB_ID_SECTION_PROPERTY
Property section identifier.protected X3fData
x3fData
The data structure to be filled with the parser result.
-
Constructor Summary
Constructors Modifier Constructor Description protected
X3fParser(RandomAccessData data)
Constructor identifying and reading the file type and header.protected
X3fParser(RandomAccessData data, boolean skipFileType, long offsetEmbedded)
Constructor identifying and reading the file header.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract boolean
readX3fDirectory(RandomAccessData data)
Reads or reconstructs an X3fDirectory.
-
-
-
Field Detail
-
FOVB_ID_FILE_TYPE
protected static final String FOVB_ID_FILE_TYPE
File type identifier.- See Also:
- Constant Field Values
-
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 fromskipFileType
- true, if it is assumed, that the file type has already been checked before, false to have it checkedoffsetEmbedded
- 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
-
-