|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.shapefile.indexed.IndexedFidWriter
public class IndexedFidWriter
The Writer writes out the fid and record number of features to the fid index file.
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()
|
java.lang.String |
id()
An id for the writer. |
boolean |
isClosed()
|
long |
next()
|
void |
remove()
Increments the fidIndex by 1. |
void |
write()
Writes the current fidIndex. |
Methods inherited from class java.lang.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 java.io.IOException
shpFiles
- The shapefiles to used
java.io.IOException
public IndexedFidWriter(ShpFiles shpFiles, StorageFile storageFile) throws java.io.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.
java.io.IOException
Method Detail |
---|
public boolean hasNext() throws java.io.IOException
java.io.IOException
public long next() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public void remove() throws java.io.IOException
java.io.IOException
public void write() throws java.io.IOException
next()
moves forward in the file.
java.io.IOException
next()
,
remove()
public boolean isClosed()
public java.lang.String id()
FileWriter
id
in interface FileReader
id
in interface FileWriter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |