public final class From extends Object
NAME
from - a pseudo command used to redirect the standard input
SYNOPSIS
fromString <string> | |
fromStrings <strings> | |
from <lines> | |
from <iterator> | |
from <stream> | |
fromFile <path> | |
fromFile <file> | |
fromResource <resource> | |
fromResource <base> <resource> | |
from <in> | |
from <reader> | |
from <url> | |
from <input> |
See From.Interface
for the corresponding command signature methods.
DESCRIPTION
Pseudo-command used to redirect an input source into a command or command chain.
Options
The command supports no options.
OPERANDS
The following operands are supported:
<string> | : | String | the string to use as input | ||
<strings> | : | String... | the input lines | ||
<lines> | : | Iterable<? extends String> | collection with input lines | ||
<iterator> | : | java.util.Iterator<? extends String> | iterator returning input lines | ||
<stream> | : | java.util.stream.Stream<? extends String> | stream of input lines | ||
<path> | : | String | the file to use as input; wildcards * and ? are supported; relative paths are resolved on the basis of the current working directory. | ||
<file> | : | java.io.File | the file to use as input; relative paths are not resolved (use the string path argument to enable relative path resolving based on the current working directory). | ||
<base> | : | Class<?> | base class for subsequent resource operand if relative paths are used. | ||
<resource> | : | String | a path to the file to redirect to the next command. The resource needs
to be on the classpath. If the file is in the root directory, the
filename should be prefixed with a forward slash. e.g.:
"/test-file.txt" .
If the file is in a package, then the package should be specified
prefixed with a forward slash, and with each dot "." replaced with a
forward slash. e.g.:
| ||
<in> | : | java.io.InputStream | the input stream to read from | ||
<reader> | : | java.io.Reader | the reader used to read the input | ||
<url> | : | java.net.URL | the URL to read from | ||
<input> | : | org.unix4j.io.Input | the input object to read from |
Modifier and Type | Class and Description |
---|---|
static interface |
From.Interface<R>
Interface defining all method signatures for the "from" command.
|
Modifier and Type | Field and Description |
---|---|
static FromFactory |
Factory
Singleton
factory instance for the "from" command. |
static String |
NAME
The "from" command name.
|
public static final String NAME
public static final FromFactory Factory
factory
instance for the "from" command.Copyright © 2024. All rights reserved.