Package org.geotools.data.vpf.io
Class VPFInputStream
- Object
- 
- VPFInputStream
 
- 
- All Implemented Interfaces:
- DataTypesDefinition,- FileConstants
 - Direct Known Subclasses:
- SpatialIndexInputStream,- VariableIndexInputStream
 
 public abstract class VPFInputStream extends Object implements FileConstants, DataTypesDefinition VPFInputStream.java Created: Mon Feb 24 22:39:57 2003- Author:
- Artur Hefczyc, Knut-Erik Johnsen, Project OneMap
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected VPFHeaderheaderDescribe variableheaderhere.protected RandomAccessFileinputDescribe variableinputhere.protected StringstreamFileDescribe variablestreamFilehere.- 
Fields inherited from interface DataTypesDefinitionBIG_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
 - 
Fields inherited from interface FileConstantsAREA_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
 
- 
 - 
Constructor SummaryConstructors Constructor Description VPFInputStream(String file)Creates a newVPFInputStreaminstance.VPFInputStream(String file, char byteOrder)Creates a newVPFInputStreaminstance.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intavailableRows()DescribeavailableRowsmethod here.voidclose()Describeclosemethod here.protected voidcondeb(String msg)Describecondebmethod here.chargetByteOrder()Get the ByteOrder value.VPFHeadergetHeader()DescribegetHeadermethod here.StringgetVariableIndexFileName()DescribegetVariableIndexFileNamemethod here.ListreadAllRows()DescribereadAllRowsmethod here.protected charreadChar()DescribereadCharmethod here.protected Position[]readCoord2DDouble(int instancesCount)protected Position[]readCoord2DFloat(int instancesCount)protected Position[]readCoord3DDouble(int instancesCount)protected Position[]readCoord3DFloat(int instancesCount)protected doublereadDouble()DescribereadDoublemethod here.protected ObjectreadFixedSizeData(char dataType, int instancesCount)DescribereadFixedSizeDatamethod here.protected floatreadFloat()DescribereadFloatmethod here.abstract VPFHeaderreadHeader()DescribereadHeadermethod here.protected intreadInteger()DescribereadIntegermethod here.protected byte[]readNumber(int cnt)DescribereadNumbermethod here.abstract VPFRowreadRow()DescribereadRowmethod here.VPFRowreadRow(int index)MethodreadRowis used to performintreadRows(VPFRow[] rows)MethodreadRowsis used to performintreadRows(VPFRow[] rows, int fromIndex)DescribereadRowsmethod here.protected shortreadShort()DescribereadShortmethod here.protected StringreadString(String terminators)DescribereadStringmethod here.protected TripletIdreadTripletId()protected ObjectreadVariableSizeData(char dataType)DescribereadVariableSizeDatamethod here.protected voidseek(long pos)Describeseekmethod here.voidsetByteOrder(char newByteOrder)Set the ByteOrder value.voidsetPosition(long pos)DOCUMENT ME!abstract inttableSize()DescribetableSizemethod here.protected voidunread(long bytes)Describeunreadmethod here.
 
- 
- 
- 
Field Detail- 
inputprotected RandomAccessFile input Describe variableinputhere.
 - 
headerprotected VPFHeader header Describe variableheaderhere.
 - 
streamFileprotected String streamFile Describe variablestreamFilehere.
 
- 
 - 
Constructor Detail- 
VPFInputStreampublic VPFInputStream(String file) throws IOException Creates a newVPFInputStreaminstance.- Parameters:
- file- a- Stringvalue
- Throws:
- IOException- if an error occurs
 
 - 
VPFInputStreampublic VPFInputStream(String file, char byteOrder) throws IOException Creates a newVPFInputStreaminstance.- Parameters:
- file- a- Stringvalue
- byteOrder- a- charvalue
- Throws:
- IOException- if an error occurs
 
 
- 
 - 
Method Detail- 
readHeaderpublic abstract VPFHeader readHeader() throws IOException DescribereadHeadermethod here.- Returns:
- a VPFHeadervalue
- Throws:
- IOException- if an error occurs
 
 - 
readRowpublic abstract VPFRow readRow() throws IOException DescribereadRowmethod here.- Returns:
- a VPFRowvalue
- Throws:
- IOException- if an error occurs
 
 - 
tableSizepublic abstract int tableSize() throws IOExceptionDescribetableSizemethod here.- Returns:
- an intvalue
- Throws:
- IOException- if an error occurs
 
 - 
getVariableIndexFileNamepublic String getVariableIndexFileName() DescribegetVariableIndexFileNamemethod here.- Returns:
- a Stringvalue
 
 - 
getHeaderpublic VPFHeader getHeader() DescribegetHeadermethod here.- Returns:
- a VPFHeadervalue
 
 - 
getByteOrderpublic char getByteOrder() Get the ByteOrder value.- Returns:
- the ByteOrder value.
 
 - 
setByteOrderpublic void setByteOrder(char newByteOrder) Set the ByteOrder value.- Parameters:
- newByteOrder- The new ByteOrder value.
 
 - 
unreadprotected void unread(long bytes) throws IOExceptionDescribeunreadmethod here.- Parameters:
- bytes- a- longvalue
- Throws:
- IOException- if an error occurs
 
 - 
seekprotected void seek(long pos) throws IOExceptionDescribeseekmethod here.- Parameters:
- pos- a- longvalue
- Throws:
- IOException- if an error occurs
 
 - 
setPositionpublic void setPosition(long pos) throws IOExceptionDOCUMENT ME!- Parameters:
- pos- DOCUMENT ME!
- Throws:
- IOException- DOCUMENT ME!
 
 - 
readRowpublic VPFRow readRow(int index) throws IOException MethodreadRowis used to perform- Parameters:
- index- an- int
- Returns:
- a VPFRow
- Throws:
- IOException- if an error occurs
 
 - 
readAllRowspublic List readAllRows() throws IOException DescribereadAllRowsmethod here.- Returns:
- a Listvalue
- Throws:
- IOException- if an error occurs
 
 - 
readRowspublic int readRows(VPFRow[] rows) throws IOException MethodreadRowsis used to perform- Parameters:
- rows- a- VPFRow[]
- Returns:
- an int
- Throws:
- IOException- if an error occurs
 
 - 
readRowspublic int readRows(VPFRow[] rows, int fromIndex) throws IOException DescribereadRowsmethod here.- Parameters:
- rows- a- VPFRow[]value
- fromIndex- an- intvalue
- Returns:
- an intvalue
- Throws:
- IOException- if an error occurs
 
 - 
readCharprotected char readChar() throws IOExceptionDescribereadCharmethod here.- Returns:
- a charvalue
- Throws:
- IOException- if an error occurs
 
 - 
readStringprotected String readString(String terminators) throws IOException DescribereadStringmethod here.- Parameters:
- terminators- a- Stringvalue
- Returns:
- a Stringvalue
- Throws:
- IOException- if an error occurs
 
 - 
readVariableSizeDataprotected Object readVariableSizeData(char dataType) throws IOException DescribereadVariableSizeDatamethod here.- Parameters:
- dataType- a- charvalue
- Returns:
- an Objectvalue
- Throws:
- IOException- if an error occurs
 
 - 
readFixedSizeDataprotected Object readFixedSizeData(char dataType, int instancesCount) throws IOException DescribereadFixedSizeDatamethod here.- Parameters:
- dataType- a- charvalue
- instancesCount- an- intvalue
- Returns:
- an Objectvalue
- Throws:
- IOException- if an error occurs
 
 - 
readNumberprotected byte[] readNumber(int cnt) throws IOExceptionDescribereadNumbermethod here.- Parameters:
- cnt- an- intvalue
- Returns:
- a byte[]value
- Throws:
- IOException- if an error occurs
 
 - 
readShortprotected short readShort() throws IOExceptionDescribereadShortmethod here.- Returns:
- a shortvalue
- Throws:
- IOException- if an error occurs
 
 - 
readIntegerprotected int readInteger() throws IOExceptionDescribereadIntegermethod here.- Returns:
- an intvalue
- Throws:
- IOException- if an error occurs
 
 - 
readFloatprotected float readFloat() throws IOExceptionDescribereadFloatmethod here.- Returns:
- a floatvalue
- Throws:
- IOException- if an error occurs
 
 - 
readDoubleprotected double readDouble() throws IOExceptionDescribereadDoublemethod here.- Returns:
- a doublevalue
- Throws:
- IOException- if an error occurs
 
 - 
readTripletIdprotected TripletId readTripletId() throws IOException - Throws:
- IOException
 
 - 
readCoord3DFloatprotected Position[] readCoord3DFloat(int instancesCount) throws IOException - Throws:
- IOException
 
 - 
readCoord2DFloatprotected Position[] readCoord2DFloat(int instancesCount) throws IOException - Throws:
- IOException
 
 - 
readCoord2DDoubleprotected Position[] readCoord2DDouble(int instancesCount) throws IOException - Throws:
- IOException
 
 - 
readCoord3DDoubleprotected Position[] readCoord3DDouble(int instancesCount) throws IOException - Throws:
- IOException
 
 - 
availableRowspublic int availableRows() DescribeavailableRowsmethod here.- Returns:
- an intvalue
 
 - 
closepublic void close() throws IOExceptionDescribeclosemethod here.- Throws:
- IOException- if an error occurs
 
 - 
condebprotected void condeb(String msg) Describecondebmethod here.- Parameters:
- msg- a- Stringvalue
 
 
- 
 
-