|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.shapefile.shp.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(java.nio.channels.ReadableByteChannel channel)
Load the index file from the given channel. |
|
IndexFile(java.nio.channels.ReadableByteChannel channel,
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. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IndexFile(java.nio.channels.ReadableByteChannel channel) throws java.io.IOException
channel
- The channel to read from.
java.io.IOException
- If an error occurs.public IndexFile(java.nio.channels.ReadableByteChannel channel, boolean useMemoryMappedBuffer) throws java.io.IOException
channel
- 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
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
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |