|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectIndexFile
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. |
String |
id()
An id for the reader. |
Methods inherited from class Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexFile(ShpFiles shpFiles, boolean useMemoryMappedBuffer) throws IOException
shpFiles
- The channel to read from.
IOException
- If an error occurs.Method Detail |
---|
public ShapefileHeader getHeader()
public void close() throws IOException
IOException
protected void finalize() throws Throwable
finalize
in class Object
Throwable
Object.finalize()
public int getRecordCount()
public int getOffset(int index) throws IOException
index
- The index, from 0 to getRecordCount - 1
IOException
public int getOffsetInBytes(int index) throws IOException
index
- The index, from 0 to getRecordCount - 1
IOException
public int getContentLength(int index) throws IOException
index
- The index, from 0 to getRecordCount - 1
IOException
public String id()
FileReader
id
in interface FileReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |