R
- the generic return type for all command signature methods
to support different implementor types; the methods of a
command factory for instance returns a command instance;
command builders can also implement this interface, but their
methods return the builder itself enabling for chained method
invocation to create joined commandspublic static interface From.Interface<R> extends CommandInterface<R>
Modifier and Type | Method and Description |
---|---|
R |
from(Collection<? extends String> lines)
Uses the strings in the specified
input collection as input
lines for the next command. |
R |
from(Input input)
Reads from the given input object and redirects the contents into
the next command.
|
R |
from(InputStream stream)
Reads from the given input stream and redirects the contents into
the next command.
|
R |
from(Reader reader)
Uses the given reader and redirects the read input into the next
command.
|
R |
from(URL url)
Reads from the given URL and redirects the contents into the next
command.
|
R |
fromFile(File file)
Redirects the contents of the given file into the next command.
|
R |
fromFile(String path)
Redirects the contents of the given file into the next command.
|
R |
fromResource(String resource)
Reads from the given resource relative to the classpath and
redirects the contents into the next command.
|
R |
fromString(String string)
Uses the given string as input for the next command.
|
R |
fromStrings(String... strings)
Uses the given strings as input for the next command.
|
R fromString(String string)
string
- the string to use as input<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR fromStrings(String... strings)
strings
- the input lines<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR from(Collection<? extends String> lines)
input
collection as input
lines for the next command. Each string usually represents a single
line of the input; however, if any of the strings contains line
ending codes (UNIX or DOS independent from the host operating
system), it is split into multiple lines.lines
- collection with input lines<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR fromFile(String path)
path > ...
path
- the file to use as input; wildcards * and ? are supported; relative
paths are resolved on the basis of the current working directory.<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR fromFile(File file)
file > ...
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).<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR fromResource(String resource)
Class.getResourceAsStream(String)
.resource
- a path to the file to redirect to the next command. The will need
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.:
"/org/company/mypackage/test-file.txt"
<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR from(InputStream stream)
stream
- the input stream to read from<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR from(Reader reader)
reader
- the reader used to read the input<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR from(URL url)
url
- the URL to read from<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsR from(Input input)
input
- the input object to read from<R>
defined by the implementing class;
the command itself returns no value and writes its result to the
standard output; see class level parameter comments for more
detailsCopyright © 2016. All rights reserved.