public class OutputFileTerminal extends Object implements IOutputTerminal, IFileTerminal
Implements a terminal whose output is to be written to a file in some working directory.
| Constructor and Description |
|---|
OutputFileTerminal(IOutputWorkingDirectory workingDirectory)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFileName()
Gets the file name.
|
OutputStream |
getStream()
Gets the underlying stream.
|
BufferedWriter |
getWriter()
Gets the writer for the output terminal.
|
void |
setFileName(String value)
Sets the file name.
|
void |
writeFile()
Finalizes the log, e.g., writes it to file.
|
public OutputFileTerminal(IOutputWorkingDirectory workingDirectory)
Creates new instance.
workingDirectory - The working directory.public String getFileName()
Gets the file name.
getFileName in interface IFileTerminalpublic void setFileName(String value)
Sets the file name.
setFileName in interface IFileTerminalvalue - The file name.public BufferedWriter getWriter()
Gets the writer for the output terminal.
getWriter in interface IOutputTerminalBufferedWriter class instance.public OutputStream getStream()
Gets the underlying stream.
getStream in interface IOutputTerminalpublic void writeFile()
throws IOException
Finalizes the log, e.g., writes it to file.
writeFile in interface IFileTerminalIOException - when file writing fails.Copyright © 2021 Aspose. All Rights Reserved.