output Stream
Convert the option to an OutputStream.
The value given on the command line must be either a path to a writable file, or -
. If -
is given, stdout will be used.
If stdout is used, the resulting OutputStream will be a proxy for System.out that will not close the underlying stream. So you can always close the resulting stream without worrying about accidentally closing System.out.
Parameters
If false, an error will be reported if the given value doesn't exist. By default, the file will be created.
If true, existing files will be truncated when opened. By default, the file will be appended to.
Convert the argument to an OutputStream.
The value given on the command line must be either a path to a writable file, or -
. If -
is given, stdout will be used.
If stdout is used, the resulting OutputStream will be a proxy for System.out that will not close the underlying stream. So you can always close the resulting stream without worrying about accidentally closing System.out.
Parameters
If false, an error will be reported if the given value doesn't exist. By default, the file will be created.
If true, existing files will be truncated when opened. By default, the file will be appended to.