public class IndexFile extends Object
| Constructor and Description |
|---|
IndexFile(FileChannel channel)
Load the index file from the given channel.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
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.
|
public IndexFile(FileChannel channel) throws IOException
channel - The channel to read from.IOException - If an error occurs.public ShapefileHeader getHeader()
public void close()
throws IOException
IOExceptionpublic int getRecordCount()
public int getOffset(int index)
throws IOException
index - The index, from 0 to getRecordCount - 1IOExceptionpublic int getOffsetInBytes(int index)
throws IOException
index - The index, from 0 to getRecordCount - 1IOExceptionpublic int getContentLength(int index)
throws IOException
index - The index, from 0 to getRecordCount - 1IOExceptionCopyright © 2019 CNRS. All rights reserved.