|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.shapefile.StorageFile
public final class StorageFile
Encapsulates the idea of a file for writing data to and then later updating the original.
Constructor Summary | |
---|---|
StorageFile(ShpFiles shpFiles,
java.io.File tempFile,
ShpFileType type)
|
Method Summary | |
---|---|
int |
compareTo(StorageFile o)
Just groups together files that have the same ShpFiles instance |
java.io.File |
getFile()
Returns the storage file |
java.nio.channels.FileChannel |
getWriteChannel()
|
java.lang.String |
id()
An id for the writer. |
void |
replaceOriginal()
Replaces the file that the temporary file is acting as a transactional type cache for. |
static void |
replaceOriginals(StorageFile... storageFiles)
Takes a collection of StorageFiles and performs the replace functionality described in replaceOriginal() . |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StorageFile(ShpFiles shpFiles, java.io.File tempFile, ShpFileType type)
Method Detail |
---|
public java.io.File getFile()
public java.nio.channels.FileChannel getWriteChannel() throws java.io.IOException
java.io.IOException
public void replaceOriginal() throws java.io.IOException
java.io.IOException
replaceOriginals(StorageFile...)
public static void replaceOriginals(StorageFile... storageFiles) throws java.io.IOException
replaceOriginal()
. However, all files that are part of the same ShpFiles
are done within a lock so all of the updates for all the Files of a Shapefile can be updated
within a single lock.
storageFiles
- files to execute the replace functionality.
java.io.IOException
public int compareTo(StorageFile o)
compareTo
in interface java.lang.Comparable<StorageFile>
public java.lang.String toString()
toString
in class java.lang.Object
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 |