public class OutputHelper extends Object
| Constructor and Description |
|---|
OutputHelper() |
| Modifier and Type | Method and Description |
|---|---|
String |
createFolderFromDocument(com.github.cafdataprocessing.worker.policy.handlers.shared.document.SharedDocument document,
String outputDirectory)
Makes and returns the appropriate folder to output the provided document to.
|
String |
createFolderFromTaskMessageId(com.hpe.caf.api.worker.TaskMessage message,
String outputDirectory)
Creates a folder in the specified directory, using the ID of the provided task message.
|
void |
outputStream(String messageOutputDir,
String filename,
InputStream streamToOutput)
Outputs provided input stream to a specified file in the destination provided.
|
void |
outputString(String outputDestination,
String filename,
String fileContent)
Outputs provided string content to a specified file in the destination provided.
|
public void outputString(String outputDestination, String filename, String fileContent) throws IOException
outputDestination - Folder to write output file to.filename - Filename to give output file.fileContent - Content for output file.IOExceptionpublic void outputStream(String messageOutputDir, String filename, InputStream streamToOutput) throws IOException
messageOutputDir - Folder to write output file to.filename - Filename to give output file.streamToOutput - Stream containing content to write to the output file.IOExceptionpublic String createFolderFromTaskMessageId(com.hpe.caf.api.worker.TaskMessage message, String outputDirectory)
message - Task Message to pull ID from.outputDirectory - Directory to create new folder.public String createFolderFromDocument(com.github.cafdataprocessing.worker.policy.handlers.shared.document.SharedDocument document, String outputDirectory)
document - Document to determine folder for.outputDirectory - Directory under which the document folder should be placed.Copyright © 2015–2017 Hewlett Packard Enterprise Development LP. All rights reserved.