Class StorageFile
Object
StorageFile
- All Implemented Interfaces:
Comparable<StorageFile>,FileReader,FileWriter
Encapsulates the idea of a file for writing data to and then later updating the original.
- Author:
- jesse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintJust groups together files that have the same ShpFiles instancegetFile()Returns the storage fileid()An id for the writer.voidReplaces the file that the temporary file is acting as a transactional type cache for.static voidreplaceOriginals(StorageFile... storageFiles) Takes a collection of StorageFiles and performs the replace functionality described inreplaceOriginal().toString()
-
Constructor Details
-
StorageFile
-
-
Method Details
-
getFile
Returns the storage file- Returns:
- the storage file
-
getWriteChannel
- Throws:
IOException
-
replaceOriginal
Replaces the file that the temporary file is acting as a transactional type cache for. Acts similar to a commit.- Throws:
IOException- See Also:
-
replaceOriginals
Takes a collection of StorageFiles and performs the replace functionality described inreplaceOriginal(). However, all files that are part of the sameShpFilesare done within a lock so all of the updates for all the Files of a Shapefile can be updated within a single lock.- Parameters:
storageFiles- files to execute the replace functionality.- Throws:
IOException
-
compareTo
Just groups together files that have the same ShpFiles instance- Specified by:
compareToin interfaceComparable<StorageFile>
-
toString
-
id
Description copied from interface:FileWriterAn id for the writer. This is only used for debugging.- Specified by:
idin interfaceFileReader- Specified by:
idin interfaceFileWriter- Returns:
- id for the writer.
-