|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectIndexedFidWriter
public class IndexedFidWriter
The Writer writes out the fid and record number of features to the fid index file.
modules/plugin/shapefile (gt-shapefile.jar)
Field Summary | |
---|---|
static IndexedFidWriter |
EMPTY_WRITER
|
static int |
HEADER_SIZE
|
static int |
RECORD_SIZE
|
Constructor Summary | |
---|---|
IndexedFidWriter(ShpFiles shpFiles)
Creates a new instance and writes the fids to a storage file which is replaces the original on close(). |
|
IndexedFidWriter(ShpFiles shpFiles,
StorageFile storageFile)
Create a new instance Note: StorageFile.replaceOriginal() is NOT called. |
Method Summary | |
---|---|
void |
close()
|
boolean |
hasNext()
|
String |
id()
An id for the reader. |
boolean |
isClosed()
|
long |
next()
|
void |
remove()
Increments the fidIndex by 1. |
void |
write()
Writes the current fidIndex. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HEADER_SIZE
public static final int RECORD_SIZE
public static final IndexedFidWriter EMPTY_WRITER
Constructor Detail |
---|
public IndexedFidWriter(ShpFiles shpFiles) throws IOException
shpFiles
- The shapefiles to used
IOException
public IndexedFidWriter(ShpFiles shpFiles, StorageFile storageFile) throws IOException
StorageFile.replaceOriginal()
is NOT called. Call IndexedFidWriter(ShpFiles)
for that
behaviour.
shpFiles
- The shapefiles to usedstorageFile
- the storage file that will be written to. It will NOT be closed.
IOException
Method Detail |
---|
public boolean hasNext() throws IOException
IOException
public long next() throws IOException
IOException
public void close() throws IOException
IOException
public void remove() throws IOException
IOException
public void write() throws IOException
next()
moves forward in the file.
IOException
next()
,
remove()
public boolean isClosed()
public String id()
FileReader
id
in interface FileReader
id
in interface FileWriter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |