|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.shapefile.shp.IndexFile
public class IndexFile
IndexFile parser for .shx files.
For now, the creation of index files is done in the ShapefileWriter. But this
can be used to access the index.
For details on the index file, see
"ESRI(r)
Shapefile - A Technical Description"
* 'An ESRI White Paper .
May 1997'
Constructor Summary | |
---|---|
IndexFile(ShpFiles shpFiles,
boolean useMemoryMappedBuffer)
Load the index file from the given channel. |
Method Summary | |
---|---|
void |
close()
|
protected void |
finalize()
|
int |
getContentLength(int index)
Get the content length of the given record in bytes, not 16 bit words. |
ShapefileHeader |
getHeader()
Get the header of this index file. |
int |
getOffset(int index)
Get the offset of the record (in 16-bit words). |
int |
getOffsetInBytes(int index)
Get the offset of the record (in real bytes, not 16-bit words). |
int |
getRecordCount()
Get the number of records in this index. |
java.lang.String |
id()
An id for the reader. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexFile(ShpFiles shpFiles, boolean useMemoryMappedBuffer) throws java.io.IOException
shpFiles
- The channel to read from.
java.io.IOException
- If an error occurs.Method Detail |
---|
public ShapefileHeader getHeader()
public void close() throws java.io.IOException
java.io.IOException
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
Object.finalize()
public int getRecordCount()
public int getOffset(int index) throws java.io.IOException
index
- The index, from 0 to getRecordCount - 1
java.io.IOException
public int getOffsetInBytes(int index) throws java.io.IOException
index
- The index, from 0 to getRecordCount - 1
java.io.IOException
public int getContentLength(int index) throws java.io.IOException
index
- The index, from 0 to getRecordCount - 1
java.io.IOException
public java.lang.String id()
FileReader
id
in interface FileReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |