- java.lang.Object
-
- de.bernd_michaely.x3f.types.X3fDirectory
-
public class X3fDirectory extends Object
Class for parsing and representing the data contained in a FOVb (X3F) directory section.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
X3fDirectory.X3fDirectoryEntry
Class for encapsulating data contained in X3F directory entries.
-
Constructor Summary
Constructors Modifier Constructor Description protected
X3fDirectory()
Constructor to create an empty directory section.protected
X3fDirectory(RandomAccessData data)
Constructor to parse and collect information contained in a X3F direcrory section.protected
X3fDirectory(X3fDirectory.X3fDirectoryEntry... directoryEntries)
Constructor to create a directory section with given entries.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<X3fDirectory.X3fDirectoryEntry>
getDirectoryEntries()
Returns an unmodifiable list of directory entries.X3fDirectory.X3fDirectoryEntry
getDirectoryEntry(int index)
Returns the directory entry at the specified index.VersionNumber
getDirectoryVersion()
Returns the x3f directory section version.int
getNumberDirectoryEntries()
Returns the number of directory entries.boolean
isDirectoryVersionSupported()
Returns true, if the data version is supported by the parser.
-
-
-
Constructor Detail
-
X3fDirectory
protected X3fDirectory()
Constructor to create an empty directory section.
-
X3fDirectory
protected X3fDirectory(X3fDirectory.X3fDirectoryEntry... directoryEntries)
Constructor to create a directory section with given entries.- Parameters:
directoryEntries
- array with given directory entries
-
X3fDirectory
protected X3fDirectory(RandomAccessData data) throws RandomAccessDataException
Constructor to parse and collect information contained in a X3F direcrory section. It is assumed, that the current offset pointer of the data source is positioned just after the directory section identifier "SECd".- Parameters:
data
- the data source containing the X3F data to parse- Throws:
RandomAccessDataException
- if RandomAccessData source is invalid
-
-
Method Detail
-
isDirectoryVersionSupported
public boolean isDirectoryVersionSupported()
Returns true, if the data version is supported by the parser.- Returns:
- true, if the data version is supported
-
getDirectoryVersion
public VersionNumber getDirectoryVersion()
Returns the x3f directory section version.- Returns:
- the x3f directory section version
-
getNumberDirectoryEntries
public int getNumberDirectoryEntries()
Returns the number of directory entries.- Returns:
- the number of directory entries
-
getDirectoryEntry
public X3fDirectory.X3fDirectoryEntry getDirectoryEntry(int index)
Returns the directory entry at the specified index. Returns null, if index is invalid.- Parameters:
index
- the array index- Returns:
- the directory entry at the specified index
-
getDirectoryEntries
public List<X3fDirectory.X3fDirectoryEntry> getDirectoryEntries()
Returns an unmodifiable list of directory entries.- Returns:
- an unmodifiable list of directory entries
- Since:
- 2.0
-
-