|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.File
ReadyDirectory
@ThreadSafe public final class ReadyDirectory
The file part of the backing to a voter list. Its path is always in canonical form.
| Field Summary |
|---|
| Fields inherited from class java.io.File |
|---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Constructor Summary | |
|---|---|
ReadyDirectory(String pathname)
Constructs a ReadyDirectory. |
|
| Method Summary | |
|---|---|
(package private) static ReadyDirectory |
createReadyDirectory(File snapDirectory)
Creates a ready directory, and returns an instance of it. |
File |
inVoterFile()
Returns the file storing the snapshot of voter input. |
boolean |
isMounted()
Returns true if the list is nominally mounted; false otherwise. |
(package private) VoterList |
mount(Register register)
Tallies the results and makes them available via the database and filebase. |
File |
mountedFile()
Returns the file to which the list is serialized, when mounted. |
String |
name()
Returns the service identifier, obtained as the name of the grandparent file. |
String |
readVoterInputColumn(StringBuilder stringB,
Reader in,
boolean isLineTerminator)
Reads a single column value. |
File |
snapDirectory()
Returns the parent snap directory. |
String |
toUIString()
Returns a short identifier intended for presenting to users. |
(package private) boolean |
unmount(Register register)
Reverses a previous mount, erasing the results from the database and filebase. |
| Methods inherited from class java.io.File |
|---|
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ReadyDirectory(String pathname)
throws IOException
pathname - per File(pathname),
(will be converted to canonical form, if it is non-canonical)
FileNotFoundException - if no directory exists at the specified pathname
IOExceptioncreateReadyDirectory(File)| Method Detail |
|---|
static ReadyDirectory createReadyDirectory(File snapDirectory)
throws IOException
snapDirectory - parent directory in which to create
the new ready directory
IOExceptionpublic File inVoterFile()
public boolean isMounted()
VoterList mount(Register register)
throws IOException,
ScriptException,
SQLException
register - a register service corresponding to
this ready directory
IOException
ScriptException
SQLExceptionisMounted(),
unmount(Register)public File mountedFile()
public String name()
public String readVoterInputColumn(StringBuilder stringB,
Reader in,
boolean isLineTerminator)
throws IOException
stringB - to use, after clearing it
IOExceptionpublic File snapDirectory()
public String toUIString()
boolean unmount(Register register)
throws IOException,
SQLException
register - a register service corresponding to
this ready directory
IOException
SQLExceptionisMounted(),
mount(Register)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||