public abstract class FilterCommand extends Object
FilterCommandFactory
.Modifier and Type | Field and Description |
---|---|
protected InputStream |
in
The
InputStream this command should read from |
protected OutputStream |
out
The
OutputStream this command should write to |
Constructor and Description |
---|
FilterCommand(InputStream in,
OutputStream out)
Constructor for FilterCommand
|
protected InputStream in
InputStream
this command should read fromprotected OutputStream out
OutputStream
this command should write topublic FilterCommand(InputStream in, OutputStream out)
FilterCommand implementors are required to manage the in and out streams (close on success and/or exception).
in
- The InputStream
this command should read fromout
- The OutputStream
this command should write topublic abstract int run() throws IOException
in
and to write the result to out
. It returns the
number of bytes it read from in
. It should be called in a loop
until it returns -1 signaling that the InputStream
is
completely processed.
On successful completion (return -1) or on Exception, the streams
in
and out
are closed by the implementation.
InputStream
or
-1. -1 means that the InputStream
is completely
processed.IOException
- when IOException
occured while reading from
in
or writing to out
Copyright © 2018 Eclipse JGit Project. All rights reserved.