- java.lang.Object
-
- de.bernd_michaely.x3f.types.X3fDataFactory
-
- Direct Known Subclasses:
FovDataFactory
public class X3fDataFactory extends Object
This class is the main entry point to this module. It provides methods for parsing X3F (FOVb) data. Since library version 2.0 you are encouraged to switch to theFovDataFactory
in modulede.bernd_michaely.x3i.types
which encapsulates this module and provides methods for parsing X3F (FOVb) and X3I (FOVi) data. (Since this module can still be used for X3F only support, providing the functionality of library version 1.0, it is not deprecated though.)
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
FOVB_ID_FILE_TYPE
X3F file type identifier.protected static String
FOVB_ID_SECTION_DIRECTORY
X3F directory section identifier.
-
Constructor Summary
Constructors Modifier Constructor Description protected
X3fDataFactory()
Protected constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static X3fData
createByCombinedParser(RandomAccessData randomAccessData)
This method uses the standard parsing method to extract information from X3F files and, if it fails, uses a recovery parser as fallback.static X3fData
createByRecoveryParser(RandomAccessData randomAccessData)
Uses a recovery parsing method to extract information from X3F files.protected static X3fData
createByRecoveryParser(RandomAccessData randomAccessData, boolean skipFileType, long offsetEmbedded)
Uses a recovery parsing method to extract information from X3F files.static X3fData
createByStandardParser(RandomAccessData randomAccessData)
Uses the standard parsing method to extract information from X3F files.protected static X3fData
createByStandardParser(RandomAccessData randomAccessData, boolean skipFileType, long offsetEmbedded)
Uses the standard parsing method to extract information from X3F files.
-
-
-
Field Detail
-
FOVB_ID_FILE_TYPE
protected static final String FOVB_ID_FILE_TYPE
X3F file type identifier. Pass through protectedly to X3I module.- See Also:
- Constant Field Values
-
FOVB_ID_SECTION_DIRECTORY
protected static final String FOVB_ID_SECTION_DIRECTORY
X3F directory section identifier. Pass through protectedly to X3I module.- See Also:
- Constant Field Values
-
-
Method Detail
-
createByStandardParser
public static X3fData createByStandardParser(RandomAccessData randomAccessData)
Uses the standard parsing method to extract information from X3F files.- Parameters:
randomAccessData
- the data source to read from- Returns:
- the extracted X3F data or null, if it fails
-
createByStandardParser
protected static X3fData createByStandardParser(RandomAccessData randomAccessData, boolean skipFileType, long offsetEmbedded)
Uses the standard parsing method to extract information from X3F files.- Parameters:
randomAccessData
- 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- Returns:
- the extracted X3F data or null, if it fails
-
createByRecoveryParser
public static X3fData createByRecoveryParser(RandomAccessData randomAccessData)
Uses a recovery parsing method to extract information from X3F files.- Parameters:
randomAccessData
- the data source to read from- Returns:
- the extracted X3F data or null, if it fails
-
createByRecoveryParser
protected static X3fData createByRecoveryParser(RandomAccessData randomAccessData, boolean skipFileType, long offsetEmbedded)
Uses a recovery parsing method to extract information from X3F files.- Parameters:
randomAccessData
- 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- Returns:
- the extracted X3F data or null, if it fails
-
createByCombinedParser
public static X3fData createByCombinedParser(RandomAccessData randomAccessData)
This method uses the standard parsing method to extract information from X3F files and, if it fails, uses a recovery parser as fallback.- Parameters:
randomAccessData
- the data source to read from- Returns:
- the extracted X3F data or null, if it fails
-
-