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
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 - 1IOException
public int getOffsetInBytes(int index) throws IOException
index
- The index, from 0 to getRecordCount - 1IOException
public int getContentLength(int index) throws IOException
index
- The index, from 0 to getRecordCount - 1IOException
public String id()
FileReader
id
in interface FileReader
Copyright © 1996–2019 Geotools. All rights reserved.