| Package | Description |
|---|---|
| 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.operation |
Contains the
LineOperation
interface and the AdHocCommand
implementation facilitating the creation of ad-hoc 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. |
| Modifier and Type | Method and Description |
|---|---|
LineProcessor |
NoOp.execute(ExecutionContext context,
LineProcessor output) |
LineProcessor |
JoinedCommand.execute(ExecutionContext context,
LineProcessor output)
Executes this joined command redirecting the output of the first command
such that it becomes the input of the second command.
|
LineProcessor |
Command.execute(ExecutionContext context,
LineProcessor output)
Executes this command and returns a
LineProcessor object. |
| Modifier and Type | Method and Description |
|---|---|
LineProcessor |
NoOp.execute(ExecutionContext context,
LineProcessor output) |
LineProcessor |
JoinedCommand.execute(ExecutionContext context,
LineProcessor output)
Executes this joined command redirecting the output of the first command
such that it becomes the input of the second command.
|
LineProcessor |
Command.execute(ExecutionContext context,
LineProcessor output)
Executes this command and returns a
LineProcessor object. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
Output
Represents a line-by-line output device.
|
| Modifier and Type | Class and Description |
|---|---|
class |
BufferedOutput
Output device storing all written lines in memory in a
List. |
class |
FileOutput
Output device writing to a
File. |
class |
NullOutput
Output device writing to
/dev/null, which means that all lines
written to this device are ignored. |
class |
StdOutput
Output device writing to the
standard output stream. |
class |
StreamOutput
Output device writing to an
OutputStream. |
class |
StringOutput
Output device writing the output lines to a string.
|
class |
WriterOutput
Output device based on a
Writer. |
| Modifier and Type | Method and Description |
|---|---|
LineProcessor |
AdHocCommand.execute(ExecutionContext context,
LineProcessor output) |
| Modifier and Type | Method and Description |
|---|---|
LineProcessor |
AdHocCommand.execute(ExecutionContext context,
LineProcessor output) |
void |
LineOperation.operate(ExecutionContext context,
Line input,
LineProcessor output)
Performs an operation for the given input line.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractLineProcessor<A extends Arguments<A>>
Abstract base implementation for
LineProcessor returned by the
execute method of commands constructed with a reference to the command plus
context and output passed to
Command.execute(ExecutionContext, LineProcessor). |
class |
InputLineProcessor
A line processor for a single input
|
class |
MultipleInputLineProcessor
A line processor for multiple inputs processing the same operation for each
input object individually.
|
class |
RedirectInputLineProcessor
A line processor redirects a given
Input stream to the standard input
of a command. |
| Modifier and Type | Method and Description |
|---|---|
protected LineProcessor |
AbstractLineProcessor.getOutput()
Returns the output that was passed to the constructor of this line
processor, the object to write to when executing the command through the
this processor
|
| Modifier and Type | Method and Description |
|---|---|
void |
InputProcessor.begin(Input input,
LineProcessor output)
Indicates that the line processing task is about to start for the
specified
input device. |
void |
DefaultInputProcessor.begin(Input input,
LineProcessor output) |
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. |
void |
InputProcessor.finish(Input input,
LineProcessor output)
Indicates that this line processing task is complete for the specified
input device and can finished. |
void |
DefaultInputProcessor.finish(Input input,
LineProcessor output) |
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. |
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. |
boolean |
DefaultInputProcessor.processLine(Input input,
Line line,
LineProcessor output) |
| Constructor and Description |
|---|
AbstractLineProcessor(Command<A> command,
ExecutionContext context,
LineProcessor output)
Constructor with command creating this processor, execution context and
output to write to.
|
InputLineProcessor(Input input,
InputProcessor processor,
LineProcessor output) |
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(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.
|
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.
|
Copyright © 2016. All Rights Reserved.