public class IndexedFidWriter extends Object implements FileWriter
Modifier and Type | Field and Description |
---|---|
static IndexedFidWriter |
EMPTY_WRITER |
static int |
HEADER_SIZE |
static int |
RECORD_SIZE |
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
hasNext() |
String |
id()
An id for the writer.
|
boolean |
isClosed() |
long |
next() |
void |
remove()
Increments the fidIndex by 1.
|
void |
write()
Writes the current fidIndex.
|
public static final int HEADER_SIZE
public static final int RECORD_SIZE
public static final IndexedFidWriter EMPTY_WRITER
public IndexedFidWriter(ShpFiles shpFiles) throws IOException
shpFiles
- The shapefiles to usedIOException
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
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()
FileWriter
id
in interface FileReader
id
in interface FileWriter
Copyright © 1996–2019 Geotools. All rights reserved.