public static class Output.FolderMultiOutput extends Output.MultiOutput
Output.ArchiveMultiOutput, Output.FolderMultiOutput, Output.MultiOutput, Output.PathArchiveMultiOutput, Output.PipeArchiveMultiOutput, Output.SingleOutput| Modifier and Type | Field and Description |
|---|---|
java.nio.file.Path |
folder |
| Constructor and Description |
|---|
FolderMultiOutput(java.nio.file.Path folder) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
isSamePath(Input input)
Used to compare if an input and an output point to the same underlying file.
|
void |
open(boolean clearOutput)
Called to open any internal resources and set up the output for writing.
|
void |
validate(java.lang.String kind)
Check any preconditions about the output prior to any work occurring.
|
void |
write(java.lang.String path,
byte[] data)
Called to write a file to the output.
|
archive, archive, detectedArchive, folderpublic void validate(java.lang.String kind)
throws IOValidationException
OutputUsed to check if folder outputs are actually folders, or archives are actually zips, etc.
validate in class Outputkind - Descriptive name of the output. I.E patches, outputs, rejects, etc.IOValidationExceptionpublic void open(boolean clearOutput)
throws java.io.IOException
Output.MultiOutputopen in class Output.MultiOutputclearOutput - If the output should be wiped, or written over top of.
This only effects Output.FolderMultiOutput. Archives
are always rewritten.java.io.IOExceptionpublic void write(java.lang.String path,
byte[] data)
throws java.io.IOException
Output.MultiOutputwrite in class Output.MultiOutputpath - The relative path of the output. Will not contain a starting slash.data - The data.java.io.IOExceptionpublic void close()
close in interface java.lang.AutoCloseableclose in class Output.MultiOutputpublic boolean isSamePath(Input input)
OutputisSamePath in class Outputinput - The input.