public final class TailFactory extends Object implements Tail.Interface<TailCommand>
tail
command returning
a new command instance from every signature method.Modifier and Type | Field and Description |
---|---|
static TailFactory |
INSTANCE
The singleton instance of this factory.
|
Modifier and Type | Method and Description |
---|---|
TailCommand |
tail()
Reads the last 10 lines from the standard input and writes them to
the standard output.
|
TailCommand |
tail(File... files)
Reads the last 10 lines from each of the specified files and writes
them to the standard output.
|
TailCommand |
tail(Input... inputs)
Reads the last 10 lines from each of the specified inputs and writes
them to the standard output.
|
TailCommand |
tail(long count)
Reads the last
count lines from the standard input and
writes them to the standard output. |
TailCommand |
tail(long count,
File... files)
Reads the last
count lines from each of the specified files
and writes them to the standard output. |
TailCommand |
tail(long count,
Input... inputs)
Reads the last
count lines from each of the specified inputs
and writes them to the standard output. |
TailCommand |
tail(long count,
String... paths)
Reads the last
count lines from each of the specified files
and writes them to the standard output. |
TailCommand |
tail(String... args)
Reads the last n lines from each of the files specified and writes
them to the standard output.
|
TailCommand |
tail(TailOptions options,
long count)
Reads the last
count lines or characters from the standard
input and writes them to the standard output. |
TailCommand |
tail(TailOptions options,
long count,
File... files)
Reads the last
count lines or characters from each of the
specified files and writes them to the standard output. |
TailCommand |
tail(TailOptions options,
long count,
Input... inputs)
Reads the last
count lines or characters from each of the
specified inputs and writes them to the standard output. |
TailCommand |
tail(TailOptions options,
long count,
String... paths)
Reads the last
count lines or characters from each of the
specified files and writes them to the standard output. |
public static final TailFactory INSTANCE
public TailCommand tail()
Tail.Interface
tail
in interface Tail.Interface<TailCommand>
<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
detailspublic TailCommand tail(String... args)
Tail.Interface
"==> XXX <=="
where "XXX"
is the name
of the file.
Options can be specified by acronym (with a leading dash "-") or by long name (with two leading dashes "--"). Operands other than the default "--paths" operand have to be prefixed with the operand name.
tail
in interface Tail.Interface<TailCommand>
args
- String arguments defining the options and operands for the command.
Options can be specified by acronym (with a leading dash "-") or by
long name (with two leading dashes "--"). Operands other than the
default "--paths" operand have to be prefixed with the operand
name (e.g. "--count" for a subsequent count operand value).<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
detailspublic TailCommand tail(long count)
Tail.Interface
count
lines from the standard input and
writes them to the standard output.tail
in interface Tail.Interface<TailCommand>
count
- The last count
lines of each input file are
copied to standard output, starting from 1 (characters instead of
lines if the -c
option is specified, and offset from start
instead of end with -s
option). Must be a non-negative
integer or an exception is thrown. If count
is greater than
the number number of lines (characters) in the input, the
application will not error and send the whole file to the output.<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
detailspublic TailCommand tail(TailOptions options, long count)
Tail.Interface
count
lines or characters from the standard
input and writes them to the standard output.tail
in interface Tail.Interface<TailCommand>
options
- Options for the tail command.count
- The last count
lines of each input file are
copied to standard output, starting from 1 (characters instead of
lines if the -c
option is specified, and offset from start
instead of end with -s
option). Must be a non-negative
integer or an exception is thrown. If count
is greater than
the number number of lines (characters) in the input, the
application will not error and send the whole file to the output.<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
detailspublic TailCommand tail(File... files)
Tail.Interface
"==> XXX <=="
where "XXX"
is the name
of the file.tail
in interface Tail.Interface<TailCommand>
files
- The input files to be filtered; relative paths are not resolved (use
the string paths 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
detailspublic TailCommand tail(Input... inputs)
Tail.Interface
"==> XXX <=="
where "XXX"
is the input's
string representation.tail
in interface Tail.Interface<TailCommand>
inputs
- The inputs to be filtered.<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
detailspublic TailCommand tail(long count, File... files)
Tail.Interface
count
lines from each of the specified files
and writes them to the standard output. If more than a single file
is specified, each file is preceded by a header consisting of the
string "==> XXX <=="
where "XXX"
is the name
of the file.tail
in interface Tail.Interface<TailCommand>
count
- The last count
lines of each input file are
copied to standard output, starting from 1 (characters instead of
lines if the -c
option is specified, and offset from start
instead of end with -s
option). Must be a non-negative
integer or an exception is thrown. If count
is greater than
the number number of lines (characters) in the input, the
application will not error and send the whole file to the output.files
- The input files to be filtered; relative paths are not resolved (use
the string paths 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
detailspublic TailCommand tail(long count, String... paths)
Tail.Interface
count
lines from each of the specified files
and writes them to the standard output. If more than a single file
is specified, each file is preceded by a header consisting of the
string "==> XXX <=="
where "XXX"
is the name
of the file.tail
in interface Tail.Interface<TailCommand>
count
- The last count
lines of each input file are
copied to standard output, starting from 1 (characters instead of
lines if the -c
option is specified, and offset from start
instead of end with -s
option). Must be a non-negative
integer or an exception is thrown. If count
is greater than
the number number of lines (characters) in the input, the
application will not error and send the whole file to the output.paths
- Path names of the input files to be filtered; 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
detailspublic TailCommand tail(long count, Input... inputs)
Tail.Interface
count
lines from each of the specified inputs
and writes them to the standard output. If more than a single input
is specified, each file is preceded by a header consisting of the
string "==> XXX <=="
where "XXX"
is the input's
string representation.tail
in interface Tail.Interface<TailCommand>
count
- The last count
lines of each input file are
copied to standard output, starting from 1 (characters instead of
lines if the -c
option is specified, and offset from start
instead of end with -s
option). Must be a non-negative
integer or an exception is thrown. If count
is greater than
the number number of lines (characters) in the input, the
application will not error and send the whole file to the output.inputs
- The inputs to be filtered.<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
detailspublic TailCommand tail(TailOptions options, long count, File... files)
Tail.Interface
count
lines or characters from each of the
specified files and writes them to the standard output. If more than
a single file is specified and the -q
option is not
specified, each file is preceded by a header consisting of the
string "==> XXX <=="
where "XXX"
is the name
of the file.tail
in interface Tail.Interface<TailCommand>
options
- Options for the tail command.count
- The last count
lines of each input file are
copied to standard output, starting from 1 (characters instead of
lines if the -c
option is specified, and offset from start
instead of end with -s
option). Must be a non-negative
integer or an exception is thrown. If count
is greater than
the number number of lines (characters) in the input, the
application will not error and send the whole file to the output.files
- The input files to be filtered; relative paths are not resolved (use
the string paths 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
detailspublic TailCommand tail(TailOptions options, long count, String... paths)
Tail.Interface
count
lines or characters from each of the
specified files and writes them to the standard output. If more than
a single file is specified and the -q
option is not
specified, each file is preceded by a header consisting of the
string "==> XXX <=="
where "XXX"
is the name
of the file.tail
in interface Tail.Interface<TailCommand>
options
- Options for the tail command.count
- The last count
lines of each input file are
copied to standard output, starting from 1 (characters instead of
lines if the -c
option is specified, and offset from start
instead of end with -s
option). Must be a non-negative
integer or an exception is thrown. If count
is greater than
the number number of lines (characters) in the input, the
application will not error and send the whole file to the output.paths
- Path names of the input files to be filtered; 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
detailspublic TailCommand tail(TailOptions options, long count, Input... inputs)
Tail.Interface
count
lines or characters from each of the
specified inputs and writes them to the standard output. If more than
a single input is specified and the -q
option is not
specified, each file is preceded by a header consisting of the
string "==> XXX <=="
where "XXX"
is the input's
string representation.tail
in interface Tail.Interface<TailCommand>
options
- Options for the tail command.count
- The last count
lines of each input file are
copied to standard output, starting from 1 (characters instead of
lines if the -c
option is specified, and offset from start
instead of end with -s
option). Must be a non-negative
integer or an exception is thrown. If count
is greater than
the number number of lines (characters) in the input, the
application will not error and send the whole file to the output.inputs
- The inputs to be filtered.<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 © 2024. All rights reserved.