@ThreadSafe public final class OutputStore extends Object
VoteServer.outDirectory()| Modifier and Type | Class and Description |
|---|---|
static class |
OutputStore.ReadyDirectory
The path to a snap/readyTrace, snap/readyCount or other output record.
|
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
S_PATTERN
The pattern of the filename suffix "-S"; where S is a serial number encoded in
radix 36.
|
static FileFilter |
SNAP_DIRECTORY_FILTER
A file filter that accepts only directories that are named in the pattern of
snapshot directories.
|
static String |
SNAP_SUMMARY_FILENAME
The name of the summary file in a snapshot directory.
|
static char |
SUFFIX_DELIMITER
The delimiter that marks the beginning of every filename suffix.
|
static Pattern |
Y4MDS_PATTERN
The pattern of the filename suffix "-YYYY-MD-S", where YYYY-MD encodes the nominal
date and S is a serial number.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isS(String string)
Answers whether the specified string matches S_PATTERN.
|
static boolean |
isY4MDS(String string)
Answers whether the specified string matches Y4MDS_PATTERN.
|
static File |
mkdirsS(File parentDirectory,
String baseName)
Creates a unique directory named baseName-S, where -S is in the form of S_PATTERN.
|
static File |
mkdirsY4MDS(File parentDirectory,
String baseName)
Creates a unique directory named baseName-YYYY-MD-S, where -YYYY-MD-S is in the
form of Y4MDS_PATTERN.
|
static XMLStreamReader |
newXMLStreamReader(Reader reader)
Constructs a stream reader configured to read the snapshot summary file, and such.
|
static Calendar |
setNominalDate(Calendar calendar,
File snapDirectory)
Clears the calendar and sets the date specified by the name pattern of the snap directory.
|
static String |
suffix(String fileName)
Returns the suffix of the specified file name, including the preceding delimiter.
|
public static final Pattern S_PATTERN
isS(String),
mkdirsS(File,String)public static final FileFilter SNAP_DIRECTORY_FILTER
public static final String SNAP_SUMMARY_FILENAME
public static final char SUFFIX_DELIMITER
suffix(String),
Y4MDS_PATTERN,
Constant Field Valuespublic static final Pattern Y4MDS_PATTERN
isY4MDS(String),
mkdirsY4MDS(File,String)public static boolean isS(String string)
string - the string, which may be empty, or nullS_PATTERNpublic static boolean isY4MDS(String string)
string - the string, which may be empty, or nullY4MDS_PATTERNpublic static File mkdirsS(File parentDirectory, String baseName) throws IOException
IOExceptionS_PATTERNpublic static File mkdirsY4MDS(File parentDirectory, String baseName) throws IOException
IOExceptionY4MDS_PATTERNpublic static XMLStreamReader newXMLStreamReader(Reader reader) throws XMLStreamException
XMLStreamExceptionSNAP_SUMMARY_FILENAMEpublic static Calendar setNominalDate(Calendar calendar, File snapDirectory)
public static String suffix(String fileName)
fileName - without parent pathSUFFIX_DELIMITER