public final class StorageFile extends Object implements Comparable<StorageFile>, FileWriter
| Constructor and Description |
|---|
StorageFile(ShpFiles shpFiles,
File tempFile,
ShpFileType type) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(StorageFile o)
Just groups together files that have the same ShpFiles instance
|
File |
getFile()
Returns the storage file
|
FileChannel |
getWriteChannel() |
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(). |
String |
toString() |
public StorageFile(ShpFiles shpFiles, File tempFile, ShpFileType type)
public File getFile()
public FileChannel getWriteChannel() throws IOException
IOExceptionpublic void replaceOriginal()
throws IOException
IOExceptionreplaceOriginals(StorageFile...)public static void replaceOriginals(StorageFile... storageFiles) throws 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.IOExceptionpublic int compareTo(StorageFile o)
compareTo in interface Comparable<StorageFile>public String id()
FileWriterid in interface FileReaderid in interface FileWriterCopyright © 1996–2019 Geotools. All rights reserved.