org.geotools.data.vpf.io
Class VPFInputStream

java.lang.Object
  extended byorg.geotools.data.vpf.io.VPFInputStream
All Implemented Interfaces:
DataTypesDefinition, FileConstants
Direct Known Subclasses:
SpatialIndexInputStream, TableInputStream, VariableIndexInputStream

public abstract class VPFInputStream
extends java.lang.Object
implements FileConstants, DataTypesDefinition

VPFInputStream.java Created: Mon Feb 24 22:39:57 2003

Version:
$Id: VPFInputStream.java 17700 2006-01-22 23:30:39Z desruisseaux $
Author:
Artur Hefczyc, Knut-Erik Johnsen, Project OneMap

Field Summary
protected  VPFHeader header
          Describe variable header here.
protected  java.io.RandomAccessFile input
          Describe variable input here.
protected  java.lang.String streamFile
          Describe variable streamFile here.
 
Fields inherited from interface org.geotools.data.vpf.ifc.FileConstants
AREA_BOUMDING_RECTANGLE_TABLE, AREA_FEATURE_TABLE, AREA_JOIN_TABLE, AREA_THEMATIC_INDEX, CHARACTER_VALUE_DESCRIPTION_TABLE, COLUMN_MANDATORY, COLUMN_MANDATORY_AT_LEVEL_0, COLUMN_MANDATORY_AT_LEVEL_1, COLUMN_MANDATORY_AT_LEVEL_2, COLUMN_MANDATORY_AT_LEVEL_3, COLUMN_MANDATORY_IF_TILES, COLUMN_OPTIONAL, COLUMN_OPTIONAL_FP, COMPLEX_BOUNDING_RECTANGLE_TABLE, COMPLEX_FEATURE_TABLE, COMPLEX_JOIN_TABLE, COMPLEX_THEMATIC_INDEX, CONNECTED_NODE_PRIMITIVE, CONNECTED_NODE_SPATIAL_INDEX, COVERAGE_ATTRIBUTE_TABLE, DATA_QUALITY_COVERAGE, DATA_QUALITY_TABLE, DATABASE_HEADER_TABLE, DIAGNOSITC_POINT_TABLE, DIR_DQ, DIR_GAZETTE, DIR_LIBREF, DIR_TILEREF, EDGE_BOUNDING_RECTANGLE, EDGE_PRIMITIVE, EDGE_SPATIAL_INDEX, ENTITY_NODE_PRIMITIVE, ENTITY_NODE_SPATIAL_INDEX, EXT_ABR, EXT_AFT, EXT_AJT, EXT_ATI, EXT_CBR, EXT_CFT, EXT_CJT, EXT_CTI, EXT_DOC, EXT_DPT, EXT_FIT, EXT_FTI, EXT_JTI, EXT_LBR, EXT_LFT, EXT_LJT, EXT_LTI, EXT_PBR, EXT_PFT, EXT_PJT, EXT_PTI, EXT_RAT, EXT_RPT, EXT_TFT, EXT_TTI, FACE_BOUNDING_RECTANGLE, FACE_PRIMITIVE, FACE_SPATIAL_INDEX, FEATURE_CLASS_ATTRIBUTE_TABLE, FEATURE_CLASS_SCHEMA_TABLE, FEATURE_INDEX_TABLE, FEATURE_THEMATIC_INDEX, GEOGRAPHIC_REFERENCE_TABLE, INTEGER_VALUE_DESCRIPTION_TABLE, JOIN_THEMATIC_INDEX, KEY_NON_UNIQUE, KEY_PRIMARY, KEY_UNIQUE, LIBRARY_ATTTIBUTE_TABLE, LIBRARY_HEADER_TABLE, LIBRARY_REFERENCE_COVERAGE, LINE_BOUNDING_RECTANGLE_TABLE, LINE_FEATURE_TABLE, LINE_JOIN_TABLE, LINE_THEMATIC_INDEX, NAMES_REFERENCE_COVERAGE, NARRATIVE_TABLE, POINT_BOUNDING_RECTANGLE_TABLE, POINT_FEATURE_TABLE, POINT_JOIN_TABLE, POINT_THEMATIC_INDEX, REGISTRATION_POINT_TABLE, RELATED_ATTRIBUTE_TABLE, RING_TABLE, TABLE_CAT, TABLE_CHAR, TABLE_CND, TABLE_CSI, TABLE_DHT, TABLE_DQT, TABLE_EBR, TABLE_EDG, TABLE_END, TABLE_ESI, TABLE_FAC, TABLE_FBR, TABLE_FCA, TABLE_FCS, TABLE_FSI, TABLE_GRT, TABLE_INT, TABLE_LAT, TABLE_LHT, TABLE_NSI, TABLE_RNG, TABLE_TSI, TABLE_TXT, TEXT_FEATURE_TABLE, TEXT_PRIMITIVE, TEXT_SPATIAL_INDEX, TEXT_THEMATIC_TABLE, TILE_REFERENCE_COVERAGE, VPF_ELEMENT_SEPARATOR, VPF_FIELD_SEPARATOR, VPF_RECORD_SEPARATOR
 
Fields inherited from interface org.geotools.data.vpf.ifc.DataTypesDefinition
BIG_ENDIAN_ORDER, CHAR_NULL_VALUE, DATA_2_COORD_F, DATA_2_COORD_F_LEN, DATA_2_COORD_R, DATA_2_COORD_R_LEN, DATA_3_COORD_F, DATA_3_COORD_F_LEN, DATA_3_COORD_R, DATA_3_COORD_R_LEN, DATA_DATE_TIME, DATA_DATE_TIME_LEN, DATA_LEVEL1_TEXT, DATA_LEVEL2_TEXT, DATA_LEVEL3_TEXT, DATA_LONG_FLOAT, DATA_LONG_FLOAT_LEN, DATA_LONG_INTEGER, DATA_LONG_INTEGER_LEN, DATA_NULL_FIELD, DATA_NULL_FIELD_LEN, DATA_SHORT_FLOAT, DATA_SHORT_FLOAT_LEN, DATA_SHORT_INTEGER, DATA_SHORT_INTEGER_LEN, DATA_TEXT, DATA_TRIPLET_ID, DATA_TRIPLET_ID_LEN, LEAST_SIGNIF_FIRST, LITTLE_ENDIAN_ORDER, MOST_SIGNIF_FIRST, STRING_NULL_VALUE, STRING_NULL_VALUES
 
Constructor Summary
VPFInputStream(java.lang.String file)
          Creates a new VPFInputStream instance.
VPFInputStream(java.lang.String file, char byteOrder)
          Creates a new VPFInputStream instance.
 
Method Summary
 int availableRows()
          Describe availableRows method here.
 void close()
          Describe close method here.
protected  void condeb(java.lang.String msg)
          Describe condeb method here.
 char getByteOrder()
          Get the ByteOrder value.
 VPFHeader getHeader()
          Describe getHeader method here.
 java.lang.String getVariableIndexFileName()
          Describe getVariableIndexFileName method here.
 java.util.List readAllRows()
          Describe readAllRows method here.
protected  char readChar()
          Describe readChar method here.
protected  org.opengis.spatialschema.geometry.DirectPosition[] readCoord2DDouble(int instancesCount)
           
protected  org.opengis.spatialschema.geometry.DirectPosition[] readCoord2DFloat(int instancesCount)
           
protected  org.opengis.spatialschema.geometry.DirectPosition[] readCoord3DDouble(int instancesCount)
           
protected  org.opengis.spatialschema.geometry.DirectPosition[] readCoord3DFloat(int instancesCount)
           
protected  double readDouble()
          Describe readDouble method here.
protected  java.lang.Object readFixedSizeData(char dataType, int instancesCount)
          Describe readFixedSizeData method here.
protected  float readFloat()
          Describe readFloat method here.
abstract  VPFHeader readHeader()
          Describe readHeader method here.
protected  int readInteger()
          Describe readInteger method here.
protected  byte[] readNumber(int cnt)
          Describe readNumber method here.
abstract  VPFRow readRow()
          Describe readRow method here.
 VPFRow readRow(int index)
          Method readRow is used to perform
 int readRows(VPFRow[] rows)
          Method readRows is used to perform
 int readRows(VPFRow[] rows, int fromIndex)
          Describe readRows method here.
protected  short readShort()
          Describe readShort method here.
protected  java.lang.String readString(java.lang.String terminators)
          Describe readString method here.
protected  TripletId readTripletId()
           
protected  java.lang.Object readVariableSizeData(char dataType)
          Describe readVariableSizeData method here.
protected  void seek(long pos)
          Describe seek method here.
 void setByteOrder(char newByteOrder)
          Set the ByteOrder value.
 void setPosition(long pos)
          DOCUMENT ME!
abstract  int tableSize()
          Describe tableSize method here.
protected  void unread(long bytes)
          Describe unread method here.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

input

protected java.io.RandomAccessFile input
Describe variable input here.


header

protected VPFHeader header
Describe variable header here.


streamFile

protected java.lang.String streamFile
Describe variable streamFile here.

Constructor Detail

VPFInputStream

public VPFInputStream(java.lang.String file)
               throws java.io.IOException
Creates a new VPFInputStream instance.

Parameters:
file - a String value
Throws:
java.io.IOException - if an error occurs

VPFInputStream

public VPFInputStream(java.lang.String file,
                      char byteOrder)
               throws java.io.IOException
Creates a new VPFInputStream instance.

Parameters:
file - a String value
byteOrder - a char value
Throws:
java.io.IOException - if an error occurs
Method Detail

readHeader

public abstract VPFHeader readHeader()
                              throws java.io.IOException
Describe readHeader method here.

Returns:
a VPFHeader value
Throws:
java.io.IOException - if an error occurs

readRow

public abstract VPFRow readRow()
                        throws java.io.IOException
Describe readRow method here.

Returns:
a VPFRow value
Throws:
java.io.IOException - if an error occurs

tableSize

public abstract int tableSize()
                       throws java.io.IOException
Describe tableSize method here.

Returns:
an int value
Throws:
java.io.IOException - if an error occurs

getVariableIndexFileName

public java.lang.String getVariableIndexFileName()
Describe getVariableIndexFileName method here.

Returns:
a String value

getHeader

public VPFHeader getHeader()
Describe getHeader method here.

Returns:
a VPFHeader value

getByteOrder

public char getByteOrder()
Get the ByteOrder value.

Returns:
the ByteOrder value.

setByteOrder

public void setByteOrder(char newByteOrder)
Set the ByteOrder value.

Parameters:
newByteOrder - The new ByteOrder value.

unread

protected void unread(long bytes)
               throws java.io.IOException
Describe unread method here.

Parameters:
bytes - a long value
Throws:
java.io.IOException - if an error occurs

seek

protected void seek(long pos)
             throws java.io.IOException
Describe seek method here.

Parameters:
pos - a long value
Throws:
java.io.IOException - if an error occurs

setPosition

public void setPosition(long pos)
                 throws java.io.IOException
DOCUMENT ME!

Parameters:
pos - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!

readRow

public VPFRow readRow(int index)
               throws java.io.IOException
Method readRow is used to perform

Parameters:
index - an int value
Returns:
a VPFRow value
Throws:
java.io.IOException - if an error occurs

readAllRows

public java.util.List readAllRows()
                           throws java.io.IOException
Describe readAllRows method here.

Returns:
a List value
Throws:
java.io.IOException - if an error occurs

readRows

public int readRows(VPFRow[] rows)
             throws java.io.IOException
Method readRows is used to perform

Parameters:
rows - a VPFRow[] value
Returns:
an int value
Throws:
java.io.IOException - if an error occurs

readRows

public int readRows(VPFRow[] rows,
                    int fromIndex)
             throws java.io.IOException
Describe readRows method here.

Parameters:
rows - a VPFRow[] value
fromIndex - an int value
Returns:
an int value
Throws:
java.io.IOException - if an error occurs

readChar

protected char readChar()
                 throws java.io.IOException
Describe readChar method here.

Returns:
a char value
Throws:
java.io.IOException - if an error occurs

readString

protected java.lang.String readString(java.lang.String terminators)
                               throws java.io.IOException
Describe readString method here.

Parameters:
terminators - a String value
Returns:
a String value
Throws:
java.io.IOException - if an error occurs

readVariableSizeData

protected java.lang.Object readVariableSizeData(char dataType)
                                         throws java.io.IOException
Describe readVariableSizeData method here.

Parameters:
dataType - a char value
Returns:
an Object value
Throws:
java.io.IOException - if an error occurs

readFixedSizeData

protected java.lang.Object readFixedSizeData(char dataType,
                                             int instancesCount)
                                      throws java.io.IOException
Describe readFixedSizeData method here.

Parameters:
dataType - a char value
instancesCount - an int value
Returns:
an Object value
Throws:
java.io.IOException - if an error occurs

readNumber

protected byte[] readNumber(int cnt)
                     throws java.io.IOException
Describe readNumber method here.

Parameters:
cnt - an int value
Returns:
a byte[] value
Throws:
java.io.IOException - if an error occurs

readShort

protected short readShort()
                   throws java.io.IOException
Describe readShort method here.

Returns:
a short value
Throws:
java.io.IOException - if an error occurs

readInteger

protected int readInteger()
                   throws java.io.IOException
Describe readInteger method here.

Returns:
an int value
Throws:
java.io.IOException - if an error occurs

readFloat

protected float readFloat()
                   throws java.io.IOException
Describe readFloat method here.

Returns:
a float value
Throws:
java.io.IOException - if an error occurs

readDouble

protected double readDouble()
                     throws java.io.IOException
Describe readDouble method here.

Returns:
a double value
Throws:
java.io.IOException - if an error occurs

readTripletId

protected TripletId readTripletId()
                           throws java.io.IOException
Throws:
java.io.IOException

readCoord3DFloat

protected org.opengis.spatialschema.geometry.DirectPosition[] readCoord3DFloat(int instancesCount)
                                                                        throws java.io.IOException
Throws:
java.io.IOException

readCoord2DFloat

protected org.opengis.spatialschema.geometry.DirectPosition[] readCoord2DFloat(int instancesCount)
                                                                        throws java.io.IOException
Throws:
java.io.IOException

readCoord2DDouble

protected org.opengis.spatialschema.geometry.DirectPosition[] readCoord2DDouble(int instancesCount)
                                                                         throws java.io.IOException
Throws:
java.io.IOException

readCoord3DDouble

protected org.opengis.spatialschema.geometry.DirectPosition[] readCoord3DDouble(int instancesCount)
                                                                         throws java.io.IOException
Throws:
java.io.IOException

availableRows

public int availableRows()
Describe availableRows method here.

Returns:
an int value

close

public void close()
           throws java.io.IOException
Describe close method here.

Throws:
java.io.IOException - if an error occurs

condeb

protected void condeb(java.lang.String msg)
Describe condeb method here.

Parameters:
msg - a String value


Copyright © GeoTools. All Rights Reserved.