input Stream
fun RawOption.inputStream(fileSystem: FileSystem = FileSystems.getDefault()): NullableOption<InputStream, InputStream>
Convert the option to an InputStream.
The value given on the command line must be either a path to a readable file, or -
. If -
is given, stdin will be used.
If stdin is used, the resulting InputStream will be a proxy for System. in that will not close the underlying stream. So you can always close the resulting stream without worrying about accidentally closing System. in.
fun RawArgument.inputStream(fileSystem: FileSystem = FileSystems.getDefault()): ProcessedArgument<InputStream, InputStream>
Convert the argument to an InputStream.
The value given on the command line must be either a path to a readable file, or -
. If -
is given, stdin will be used.
If stdin is used, the resulting InputStream will be a proxy for System. in that will not close the underlying stream. So you can always close the resulting stream without worrying about accidentally closing System. in.