public class CsvSummaryFileTarget extends Object implements ExecutionTarget
ExecutionTarget that writes digests to a CSV file.| Modifier and Type | Field and Description |
|---|---|
protected SortedSet<String> |
algorithms
The set of algorithms encountered.
|
protected Iterable<? extends ArtifactListener> |
artifactListeners
List of listeners which are notified every time a CSV file is created.
|
static String |
CSV_COLUMN_SEPARATOR
The CSV column separator character.
|
static String |
CSV_COMMENT_MARKER
The CSV comment marker character.
|
protected String |
encoding
Encoding to use for generated files.
|
protected Map<ChecksumFile,Map<String,String>> |
filesHashcodes
The association file => (algorithm,hashcode).
|
static String |
LINE_SEPARATOR
The line separator character.
|
protected File |
summaryFile
The target file where the summary is written.
|
| Constructor and Description |
|---|
CsvSummaryFileTarget(File summaryFile,
String encoding,
Iterable<? extends ArtifactListener> artifactListeners)
Build a new instance of
CsvSummaryFileTarget. |
| Modifier and Type | Method and Description |
|---|---|
void |
close(String subPath)
Close the target.
|
void |
init()
Initialize the target.
|
void |
write(String digest,
ChecksumFile file,
String algorithm)
Write the hashcode calculated for the given file and algorithm to the target.
|
public static final String LINE_SEPARATOR
public static final String CSV_COLUMN_SEPARATOR
public static final String CSV_COMMENT_MARKER
protected String encoding
protected Map<ChecksumFile,Map<String,String>> filesHashcodes
protected File summaryFile
protected final Iterable<? extends ArtifactListener> artifactListeners
public CsvSummaryFileTarget(File summaryFile, String encoding, Iterable<? extends ArtifactListener> artifactListeners)
CsvSummaryFileTarget.summaryFile - the file to which the summary should be written.encoding - the encoding to use for generated files.artifactListeners - public void init()
Should be called before first call to ExecutionTarget.write(String, ChecksumFile, String).
init in interface ExecutionTargetpublic void write(String digest, ChecksumFile file, String algorithm)
write in interface ExecutionTargetdigest - the digest to write.file - the file for which the digest was calculated.algorithm - the algorithm used to calculate the digest.public void close(String subPath) throws ExecutionTargetCloseException
Should be called after last call to ExecutionTarget.write(String, ChecksumFile, String).
close in interface ExecutionTargetExecutionTargetCloseException - if an error occured while closing the target.Copyright © 2010–2016. All rights reserved.