class HeadCommand extends AbstractCommand<HeadArguments>
head
command.Constructor and Description |
---|
HeadCommand(HeadArguments arguments) |
Modifier and Type | Method and Description |
---|---|
LineProcessor |
execute(ExecutionContext context,
LineProcessor output)
Executes this command and returns a
LineProcessor object. |
getArguments, getName, join, toString
public HeadCommand(HeadArguments arguments)
public LineProcessor execute(ExecutionContext context, LineProcessor output)
Command
LineProcessor
object. Calling
this method initiates the command execution, but the real processing of
the command takes place when lines are passed to the returned
LineProcessor
object. The command execution is terminated by
calling LineProcessor.finish()
.
The command writes its output to the specified output
object.
Depending on the command implementation, the output is written when lines
are passed to the LineProcessor
returned by this method, or when
the execution terminates with the finish()
call.
context
- context object providing access to the current directory,
environment variables and other information useful for the
command during its executionoutput
- the output to write toCopyright © 2024. All rights reserved.