public interface To
| Modifier and Type | Method and Description |
|---|---|
void |
toDevNull()
Executes the composite command and does not write the result anywhere.
|
int |
toExitValue()
Executes the composite command returns its exit value, 0 if the command
completes successfully and another command specific error value different
from zero if the command throws an
ExitValueException. |
void |
toFile(java.io.File file)
Executes the composite command and writes the result to the given file.
|
void |
toFile(java.lang.String file)
Executes the composite command and writes the result to the given file.
|
java.util.List<Line> |
toLineList()
Executes the composite command and returns the result as a list
containing the output lines.
|
java.util.stream.Stream<Line> |
toLineStream()
Executes the composite command and returns the result as a stream
containing the output lines.
|
void |
toOutput(Output output)
Executes the composite command and writes the result to the given output.
|
void |
toOutputStream(java.io.OutputStream stream)
Executes the composite command and writes the result to the given stream.
|
void |
toStdOut()
Executes the composite command and writes the result to the standard
output.
|
java.util.List<java.lang.String> |
toStringList()
Executes the composite command and returns the result as a list
containing the output lines without line ending.
|
java.lang.String |
toStringResult()
Executes the composite command and returns the result as string.
|
java.util.stream.Stream<java.lang.String> |
toStringStream()
Executes the composite command and returns the result as a stream
containing the output lines without line endings.
|
void |
toWriter(java.io.Writer writer)
Executes the composite command and writes the result using the given
writer.
|
void toStdOut()
java.lang.String toStringResult()
To return a representation of the command with its arguments without
executing the command, toString() can be used
instead.
java.util.List<Line> toLineList()
java.util.List<java.lang.String> toStringList()
java.util.stream.Stream<Line> toLineStream()
java.util.stream.Stream<java.lang.String> toStringStream()
void toFile(java.lang.String file)
file - the target output filevoid toDevNull()
void toFile(java.io.File file)
file - the target output filevoid toOutputStream(java.io.OutputStream stream)
stream - the target output streamvoid toWriter(java.io.Writer writer)
writer - the writer used to write the outputvoid toOutput(Output output)
int toExitValue()
ExitValueException.Copyright © 2021. All Rights Reserved.