Package | Description |
---|---|
org.unix4j |
Provides a single class
Unix4j with static methods
serving as entry point to build commands and command chains joining several
commands. |
org.unix4j.command |
Declares the basic command interface and contains related classes used by
most command implementations.
|
org.unix4j.io |
Contains interfaces and classes used to handle input and output of commands.
|
org.unix4j.processor |
Defines
LineProcessor and
InputProcessor , two interfaces
used for line-by-line input processing, and provides some basic
implementations for both interfaces. |
org.unix4j.unix |
Provides implementations for commands inspired by well known unix commands.
|
org.unix4j.unix.cat |
Contains private classes used by the
cat command. |
org.unix4j.unix.from |
Contains private classes used by the
from command. |
org.unix4j.unix.grep |
Contains private classes used by the
grep command. |
org.unix4j.unix.head |
Contains private classes used by the
head command. |
org.unix4j.unix.sort |
Contains private classes used by the
sort command. |
org.unix4j.unix.tail |
Contains private classes used by the
tail command. |
org.unix4j.unix.wc |
Contains private classes used by the
wc command. |
Modifier and Type | Method and Description |
---|---|
static Unix4jCommandBuilder |
Unix4j.cat(CatOptions options,
Input... inputs)
Reads the lines from the specified inputs and writes them to the
standard output; the given options define the details of the output
format.
|
static Unix4jCommandBuilder |
Unix4j.cat(Input... inputs)
Reads the lines from the specified inputs and writes them to the
standard output.
|
static Unix4jCommandBuilder |
Unix4j.from(Input input)
Reads from the given input object and redirects the contents into
the next command.
|
static Unix4jCommandBuilder |
Unix4j.grep(GrepOptions options,
Pattern pattern,
Input... inputs)
Filters the input lines from the specified inputs and writes
the matching lines to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.grep(GrepOptions options,
String regexp,
Input... inputs)
Filters the input lines from the specified inputs and writes
the matching lines to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.grep(Pattern pattern,
Input... inputs)
Filters the lines from the specified inputs and writes the
matching lines to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.grep(String regexp,
Input... inputs)
Filters the lines from the specified inputs and writes the
matching lines to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.head(HeadOptions options,
long count,
Input... inputs)
Reads the first
count lines or characters from each of the
specified inputs and writes them to the standard output. |
static Unix4jCommandBuilder |
Unix4j.head(Input... inputs)
Reads the first 10 lines from each of the specified inputs and writes
them to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.head(long count,
Input... inputs)
Reads the first
count lines from each of the specified inputs
and writes them to the standard output. |
static Unix4jCommandBuilder |
Unix4j.sort(Comparator<? super Line> comparator,
Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.sort(Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.sort(SortOptions options,
Comparator<? super Line> comparator,
Input... inputs)
Sorts, merges, or sequence checks the lines the lines of all the
specified inputs together and writes the result to the standard
output.
|
static Unix4jCommandBuilder |
Unix4j.sort(SortOptions options,
Input... inputs)
Sorts, merges, or sequence checks the lines the lines of all the
specified inputs together and writes the result to the standard
output.
|
static Unix4jCommandBuilder |
Unix4j.tail(Input... inputs)
Reads the last 10 lines from each of the specified inputs and writes
them to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.tail(long count,
Input... inputs)
Reads the last
count lines from each of the specified inputs
and writes them to the standard output. |
static Unix4jCommandBuilder |
Unix4j.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. |
static Unix4jCommandBuilder |
Unix4j.wc(Input... inputs)
Executes a count of lines, words and chars contained in each input
and writes them to the standard output.
|
static Unix4jCommandBuilder |
Unix4j.wc(WcOptions options,
Input... inputs)
Executes a one or more counts, depending on the given options, in
each of the given inputs and writes them to the standard
output.
|
Modifier and Type | Method and Description |
---|---|
Input |
ExitValueException.getInput()
Returns the input source that was causing this exception, for instance an
input file that was passed to a command.
|
Modifier and Type | Method and Description |
---|---|
void |
ExitValueException.setInput(Input input)
Sets the input source that was causing this exception, for instance an
input file that was passed to a command.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractInput
Base implementation for
Input providing the
iterator() method. |
class |
BufferedInput
Input device based on a
LinkedList line buffer. |
class |
CompositeInput
An input composed from multiple other inputs returning all lines of the first
input, then all lines of the of the second input etc.
|
class |
FileInput
Input device reading from a
File . |
class |
IteratorInput
Input device based on a
Iterator returning lines. |
class |
NullInput
Input device representing an empty set with no lines.
|
class |
ReaderInput
|
class |
ResourceInput
Input device reading a resource using
Class.getResourceAsStream(String) . |
class |
StdInput
Input device reading from the
standard input stream. |
class |
StreamInput
Input device reading from an
InputStream . |
class |
StringInput
Input device reading the input from a string.
|
class |
URLInput
Input device based on a
URL . |
Modifier and Type | Method and Description |
---|---|
static Input |
FileInput.composite(File... files)
Creates and returns an input composed from the specified files
altogether.
|
static Input |
FileInput.composite(List<File> files)
Creates and returns an input composed from the specified files
altogether.
|
Constructor and Description |
---|
CompositeInput(Input... inputs)
Constructor with inputs to combine.
|
Constructor and Description |
---|
CompositeInput(List<? extends Input> inputs)
Constructor with inputs to combine.
|
Modifier and Type | Method and Description |
---|---|
void |
DefaultInputProcessor.begin(Input input,
LineProcessor output) |
void |
InputProcessor.begin(Input input,
LineProcessor output)
Indicates that the line processing task is about to start for the
specified
input device. |
void |
DefaultInputProcessor.finish(Input input,
LineProcessor output) |
void |
InputProcessor.finish(Input input,
LineProcessor output)
Indicates that this line processing task is complete for the specified
input device and can finished. |
boolean |
DefaultInputProcessor.processLine(Input input,
Line line,
LineProcessor output) |
boolean |
InputProcessor.processLine(Input input,
Line line,
LineProcessor output)
Processes a single line and returns true if this
InputProcessor
is ready to process more lines. |
Modifier and Type | Method and Description |
---|---|
protected void |
MultipleInputLineProcessor.beginMultiple(List<? extends Input> inputs,
LineProcessor output)
Called once at the beginning before iterating over the
Input
objects in the given inputs list. |
protected void |
MultipleInputLineProcessor.finishMultiple(List<? extends Input> inputs,
LineProcessor output)
Called once at the end after iterating over the
Input objects in
the given inputs list. |
Constructor and Description |
---|
InputLineProcessor(Input input,
InputProcessor processor,
LineProcessor output) |
RedirectInputLineProcessor(Input input,
LineProcessor standardInputProcessor)
Constructor with input object (usually a file operand of the command) and
the command processor that reads from the standard input.
|
Constructor and Description |
---|
MultipleInputLineProcessor(List<? extends Input> inputs,
InputProcessor processor,
LineProcessor output)
Constructor with input objects (usually file operands of the command) and
the input processor of the command that reads from the standard input.
|
RedirectInputLineProcessor(List<? extends Input> inputs,
LineProcessor standardInputProcessor)
Constructor with multiple input objects (usually file operands of the
command) and the command processor that reads from the standard input.
|
Modifier and Type | Method and Description |
---|---|
R |
Cat.Interface.cat(CatOptions options,
Input... inputs)
Reads the lines from the specified inputs and writes them to the
standard output; the given options define the details of the output
format.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.cat(CatOptions options,
Input... inputs)
Reads the lines from the specified inputs and writes them to the
standard output; the given options define the details of the output
format.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.cat(CatOptions options,
Input... inputs) |
R |
Cat.Interface.cat(Input... inputs)
Reads the lines from the specified inputs and writes them to the
standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.cat(Input... inputs)
Reads the lines from the specified inputs and writes them to the
standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.cat(Input... inputs) |
Unix4jCommandBuilder |
Unix4jCommandBuilder.from(Input input)
Reads from the given input object and redirects the contents into
the next command.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.from(Input input) |
R |
From.Interface.from(Input input)
Reads from the given input object and redirects the contents into
the next command.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.grep(GrepOptions options,
Pattern pattern,
Input... inputs)
Filters the input lines from the specified inputs and writes
the matching lines to the standard output.
|
R |
Grep.Interface.grep(GrepOptions options,
Pattern pattern,
Input... inputs)
Filters the input lines from the specified inputs and writes
the matching lines to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.grep(GrepOptions options,
Pattern pattern,
Input... inputs) |
Unix4jCommandBuilder |
Unix4jCommandBuilder.grep(GrepOptions options,
String regexp,
Input... inputs)
Filters the input lines from the specified inputs and writes
the matching lines to the standard output.
|
R |
Grep.Interface.grep(GrepOptions options,
String regexp,
Input... inputs)
Filters the input lines from the specified inputs and writes
the matching lines to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.grep(GrepOptions options,
String regexp,
Input... inputs) |
Unix4jCommandBuilder |
Unix4jCommandBuilder.grep(Pattern pattern,
Input... inputs)
Filters the lines from the specified inputs and writes the
matching lines to the standard output.
|
R |
Grep.Interface.grep(Pattern pattern,
Input... inputs)
Filters the lines from the specified inputs and writes the
matching lines to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.grep(Pattern pattern,
Input... inputs) |
Unix4jCommandBuilder |
Unix4jCommandBuilder.grep(String regexp,
Input... inputs)
Filters the lines from the specified inputs and writes the
matching lines to the standard output.
|
R |
Grep.Interface.grep(String regexp,
Input... inputs)
Filters the lines from the specified inputs and writes the
matching lines to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.grep(String regexp,
Input... inputs) |
Unix4jCommandBuilder |
Unix4jCommandBuilder.head(HeadOptions options,
long count,
Input... inputs)
Reads the first
count lines or characters from each of the
specified inputs and writes them to the standard output. |
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.head(HeadOptions options,
long count,
Input... inputs) |
R |
Head.Interface.head(HeadOptions options,
long count,
Input... inputs)
Reads the first
count lines or characters from each of the
specified inputs and writes them to the standard output. |
Unix4jCommandBuilder |
Unix4jCommandBuilder.head(Input... inputs)
Reads the first 10 lines from each of the specified inputs and writes
them to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.head(Input... inputs) |
R |
Head.Interface.head(Input... inputs)
Reads the first 10 lines from each of the specified inputs and writes
them to the standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.head(long count,
Input... inputs)
Reads the first
count lines from each of the specified inputs
and writes them to the standard output. |
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.head(long count,
Input... inputs) |
R |
Head.Interface.head(long count,
Input... inputs)
Reads the first
count lines from each of the specified inputs
and writes them to the standard output. |
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(Comparator<? super Line> comparator,
Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(Comparator<? super Line> comparator,
Input... inputs) |
R |
Sort.Interface.sort(Comparator<? super Line> comparator,
Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(Input... inputs) |
R |
Sort.Interface.sort(Input... inputs)
Sort the lines of all the specified inputs together and writes the
result to the standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(SortOptions options,
Comparator<? super Line> comparator,
Input... inputs)
Sorts, merges, or sequence checks the lines the lines of all the
specified inputs together and writes the result to the standard
output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(SortOptions options,
Comparator<? super Line> comparator,
Input... inputs) |
R |
Sort.Interface.sort(SortOptions options,
Comparator<? super Line> comparator,
Input... inputs)
Sorts, merges, or sequence checks the lines the lines of all the
specified inputs together and writes the result to the standard
output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.sort(SortOptions options,
Input... inputs)
Sorts, merges, or sequence checks the lines the lines of all the
specified inputs together and writes the result to the standard
output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.sort(SortOptions options,
Input... inputs) |
R |
Sort.Interface.sort(SortOptions options,
Input... inputs)
Sorts, merges, or sequence checks the lines the lines of all the
specified inputs together and writes the result to the standard
output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.tail(Input... inputs)
Reads the last 10 lines from each of the specified inputs and writes
them to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.tail(Input... inputs) |
R |
Tail.Interface.tail(Input... inputs)
Reads the last 10 lines from each of the specified inputs and writes
them to the standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.tail(long count,
Input... inputs)
Reads the last
count lines from each of the specified inputs
and writes them to the standard output. |
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.tail(long count,
Input... inputs) |
R |
Tail.Interface.tail(long count,
Input... inputs)
Reads the last
count lines from each of the specified inputs
and writes them to the standard output. |
Unix4jCommandBuilder |
Unix4jCommandBuilder.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. |
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.tail(TailOptions options,
long count,
Input... inputs) |
R |
Tail.Interface.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. |
Unix4jCommandBuilder |
Unix4jCommandBuilder.wc(Input... inputs)
Executes a count of lines, words and chars contained in each input
and writes them to the standard output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.wc(Input... inputs) |
R |
Wc.Interface.wc(Input... inputs)
Executes a count of lines, words and chars contained in each input
and writes them to the standard output.
|
Unix4jCommandBuilder |
Unix4jCommandBuilder.wc(WcOptions options,
Input... inputs)
Executes a one or more counts, depending on the given options, in
each of the given inputs and writes them to the standard
output.
|
Unix4jCommandBuilder |
DefaultUnix4jCommandBuilder.wc(WcOptions options,
Input... inputs) |
R |
Wc.Interface.wc(WcOptions options,
Input... inputs)
Executes a one or more counts, depending on the given options, in
each of the given inputs and writes them to the standard
output.
|
Modifier and Type | Method and Description |
---|---|
Input[] |
CatArguments.getInputs()
Returns the
<inputs> operand value: The inputs to be printed. |
Modifier and Type | Method and Description |
---|---|
CatCommand |
CatFactory.cat(CatOptions options,
Input... inputs) |
CatCommand |
CatFactory.cat(Input... inputs) |
void |
CatArguments.setInputs(Input... inputs)
Sets
<inputs> : The inputs to be printed. |
Modifier and Type | Method and Description |
---|---|
Input |
FromArguments.getInput()
Returns the
<input> operand value: the input object to read from |
Modifier and Type | Method and Description |
---|---|
FromCommand |
FromFactory.from(Input input) |
void |
FromArguments.setInput(Input input)
Sets
<input> : the input object to read from |
Modifier and Type | Method and Description |
---|---|
Input[] |
GrepArguments.getInputs()
Returns the
<inputs> operand value: The inputs to be searched for the pattern. |
Modifier and Type | Method and Description |
---|---|
void |
CountMatchingLinesInputProcessor.begin(Input input,
LineProcessor output) |
void |
WriteMatchingLinesInputProcessor.begin(Input input,
LineProcessor output) |
void |
WriteFilesWithMatchingLinesProcessor.begin(Input input,
LineProcessor output) |
void |
CountMatchingLinesInputProcessor.finish(Input input,
LineProcessor output) |
void |
WriteMatchingLinesInputProcessor.finish(Input input,
LineProcessor output) |
void |
WriteFilesWithMatchingLinesProcessor.finish(Input input,
LineProcessor output) |
GrepCommand |
GrepFactory.grep(GrepOptions options,
Pattern pattern,
Input... inputs) |
GrepCommand |
GrepFactory.grep(GrepOptions options,
String regexp,
Input... inputs) |
GrepCommand |
GrepFactory.grep(Pattern pattern,
Input... inputs) |
GrepCommand |
GrepFactory.grep(String regexp,
Input... inputs) |
boolean |
CountMatchingLinesInputProcessor.processLine(Input input,
Line line,
LineProcessor output) |
boolean |
WriteMatchingLinesInputProcessor.processLine(Input input,
Line line,
LineProcessor output) |
boolean |
WriteFilesWithMatchingLinesProcessor.processLine(Input input,
Line line,
LineProcessor output) |
void |
GrepArguments.setInputs(Input... inputs)
Sets
<inputs> : The inputs to be searched for the pattern. |
Modifier and Type | Method and Description |
---|---|
Input[] |
HeadArguments.getInputs()
Returns the
<inputs> operand value: The inputs to be filtered. |
Modifier and Type | Method and Description |
---|---|
HeadCommand |
HeadFactory.head(HeadOptions options,
long count,
Input... inputs) |
HeadCommand |
HeadFactory.head(Input... inputs) |
HeadCommand |
HeadFactory.head(long count,
Input... inputs) |
void |
HeadArguments.setInputs(Input... inputs)
Sets
<inputs> : The inputs to be filtered. |
Modifier and Type | Method and Description |
---|---|
Input[] |
SortArguments.getInputs()
Returns the
<inputs> operand value: The inputs to be sorted or merged. |
Modifier and Type | Method and Description |
---|---|
void |
SortArguments.setInputs(Input... inputs)
Sets
<inputs> : The inputs to be sorted or merged. |
SortCommand |
SortFactory.sort(Comparator<? super Line> comparator,
Input... inputs) |
SortCommand |
SortFactory.sort(Input... inputs) |
SortCommand |
SortFactory.sort(SortOptions options,
Comparator<? super Line> comparator,
Input... inputs) |
SortCommand |
SortFactory.sort(SortOptions options,
Input... inputs) |
Constructor and Description |
---|
MergeProcessor(SortCommand command,
ExecutionContext context,
LineProcessor output,
List<? extends Input> inputs) |
Modifier and Type | Method and Description |
---|---|
Input[] |
TailArguments.getInputs()
Returns the
<inputs> operand value: The inputs to be filtered. |
Modifier and Type | Method and Description |
---|---|
void |
TailArguments.setInputs(Input... inputs)
Sets
<inputs> : The inputs to be filtered. |
TailCommand |
TailFactory.tail(Input... inputs) |
TailCommand |
TailFactory.tail(long count,
Input... inputs) |
TailCommand |
TailFactory.tail(TailOptions options,
long count,
Input... inputs) |
Modifier and Type | Method and Description |
---|---|
Input[] |
WcArguments.getInputs()
Returns the
<inputs> operand value: The inputs. |
Modifier and Type | Method and Description |
---|---|
void |
WcFileProcessor.finish(Input input,
LineProcessor output) |
boolean |
WcFileProcessor.processLine(Input input,
Line line,
LineProcessor output) |
void |
WcArguments.setInputs(Input... inputs)
Sets
<inputs> : The inputs. |
WcCommand |
WcFactory.wc(Input... inputs) |
WcCommand |
WcFactory.wc(WcOptions options,
Input... inputs) |
Constructor and Description |
---|
WcMultipleFilesProcessor(ExecutionContext context,
List<? extends Input> inputs,
LineProcessor output,
WcArguments args) |
Copyright © 2024. All rights reserved.