This class encapsulates VPF files. By implementing the FeatureType interface,
it serves as a factory for VPFColumns. Instances of this class should
be created by VPFFileFactory.
author: Jeff Yutzler
readFixedSizeData(char dataType, int instancesCount) Retrieves a fixed amount of data from the file
Parameters: dataType - a char value indicating the data type Parameters: instancesCount - an int value indicating the number of instances to retrieve.
protected float
readFloat() Retrieves a floating point number from the file.
readGeometry(int instancesCount, int dimensionality, boolean readDoubles) Constructs an object which is an instance of Geometry
by reading values from the file.
Constructor.
Parameters: cPathName - The path to this file throws: IOException - if the path or the file are invalid throws: SchemaException - if the contained feature type can not beconstructed
Create a new feature from the provided attributes It is unclear why one
would want to use this method.
Parameters: attributes - the attributes to used the created feature throws: IllegalAttributeException - if any of the attributes is invalid
Method getRecordSize is used to return size in
bytes of records stored in this table. If table keeps variable length
records -1 should be returned.
an int value
Returns a row with a matching value for the provided column
Parameters: idName - The name of the column to look for, such as "id" Parameters: id - An identifier for the requested row The first row which matches the ID throws: IllegalAttributeException - The feature can not be created due toillegal attributes in the source file
Retrieves a feature from the file
the retieved feature throws: IOException - on any file IO errors throws: IllegalAttributeException - if any of the attributes retrieved areillegal
readFixedSizeData
protectedObject readFixedSizeData(char dataType, int instancesCount) throws IOException(Code)
Retrieves a fixed amount of data from the file
Parameters: dataType - a char value indicating the data type Parameters: instancesCount - an int value indicating the number of instances to retrieve. an Object value exception: IOException - if an error occurs
Retrieves a floating point number from the file.
a float value exception: IOException - if an error occurs
readGeometry
protectedObject readGeometry(int instancesCount, int dimensionality, boolean readDoubles) throws IOException(Code)
Constructs an object which is an instance of Geometry
by reading values from the file.
Parameters: instancesCount - number of coordinates to read Parameters: dimensionality - either 2 or 3 Parameters: readDoubles - true: read a double value; false: read a float value the constructed object throws: IOException - on any file IO errors
Retrieves a number of attributes from the file header
exception: VPFHeaderFormatException - if an error occurs exception: IOException - if an error occurs
Reads some byte data from the file
Parameters: cnt - an int value indicating the number of bytes to retrieve a byte[] value throws: IOException - if an error occurs
Reads a string value from the file
Parameters: terminators - a String value indicating the terminators to look for a String value exception: IOException - if an error occurs
Retrieves variable sized data from the file by first reading an integer
which indicates how many instances of the data type to retrieve
Parameters: dataType - a char value indicating the data type an Object value exception: IOException - if an error occurs