|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.io.bnaapi.BNAFile
Class representing a BNA File.
Provides methods to load and parse a file in BNA format.
Data are returned as a BNAFeatureSet
Field Summary | |
private BNAFeatureSet |
_fs
The featureSet collected from the file. |
Constructor Summary | |
BNAFile(java.lang.String url)
Construct a MainFile from a file name. |
Method Summary | |
BNAFeatureSet |
getFeatureSet()
|
private java.lang.String[] |
getHeaderByQuote(java.lang.String header)
Search for quote-delimited headers We are looking for a header with this format: "name1", "name2", ... , numpoints The split array will be something like this: 0 1 2 3 4 len-1 "A","B",... |
private java.lang.String[] |
getHeaderBySpace(java.lang.String header)
Search for space-delimited headers We are looking for a header with this format: name1 TAB name2 TAB ... |
private java.lang.String[] |
getHeaderByTab(java.lang.String header)
Search for tab-delimited headers We are looking for a header with this format: name1 TAB name2 TAB ... |
private void |
loadFile(java.io.RandomAccessFile raf)
Parses a BNA file. |
static void |
main(java.lang.String[] args)
Just for some debug |
private BNAGeometry |
readGeometry(java.io.RandomAccessFile raf,
int n)
Reads n points from a file. |
private boolean |
skippable(java.io.RandomAccessFile raf)
Checks if remaining chars can be skipped. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private BNAFeatureSet _fs
Constructor Detail |
public BNAFile(java.lang.String url) throws java.io.IOException
Method Detail |
private void loadFile(java.io.RandomAccessFile raf) throws java.io.IOException
raf
- a RandomAccessFile
java.io.IOException
private java.lang.String[] getHeaderByQuote(java.lang.String header) throws java.io.IOException
header
- The header to be parsed
java.io.IOException
private java.lang.String[] getHeaderByTab(java.lang.String header) throws java.io.IOException
header
- The header to be parsed
java.io.IOException
private java.lang.String[] getHeaderBySpace(java.lang.String header) throws java.io.IOException
header
- The header to be parsed
java.io.IOException
private boolean skippable(java.io.RandomAccessFile raf) throws java.io.IOException
raf
- a RandomAccessFile
java.io.IOException
private BNAGeometry readGeometry(java.io.RandomAccessFile raf, int n) throws java.io.IOException
raf
- The input filen
- Number of points (file lines) to be read
java.io.IOException
public BNAFeatureSet getFeatureSet()
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |