public class IndexFile extends Object implements FileReader
| Constructor and Description |
|---|
IndexFile(ShpFiles shpFiles,
boolean useMemoryMappedBuffer)
Load the index file from the given channel.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public IndexFile(ShpFiles shpFiles, boolean useMemoryMappedBuffer) throws IOException
shpFiles - The channel to read from.IOException - If an error occurs.public ShapefileHeader getHeader()
public void close()
throws IOException
IOExceptionprotected void finalize()
throws Throwable
finalize in class ObjectThrowableObject.finalize()public 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 - 1IOExceptionpublic String id()
FileReaderid in interface FileReaderCopyright © 1996–2019 Geotools. All rights reserved.