public class SmudgeFilter extends FilterCommand
Modifier and Type | Field and Description |
---|---|
static FilterCommandFactory |
FACTORY
The factory is responsible for creating instances of
SmudgeFilter |
in, out
Constructor and Description |
---|
SmudgeFilter(Repository db,
InputStream in,
OutputStream out)
Constructor for SmudgeFilter.
|
Modifier and Type | Method and Description |
---|---|
static Collection<Path> |
downloadLfsResource(Lfs lfs,
Repository db,
LfsPointer... res)
Download content which is hosted on a LFS server
|
int |
run()
Execute the command.
|
public static final FilterCommandFactory FACTORY
SmudgeFilter
public SmudgeFilter(Repository db, InputStream in, OutputStream out) throws IOException
db
- a Repository
object.in
- a InputStream
object. The stream is closed in
any case.out
- a OutputStream
object.IOException
- in case of an errorpublic static Collection<Path> downloadLfsResource(Lfs lfs, Repository db, LfsPointer... res) throws IOException
lfs
- local Lfs
storage.db
- the repository to work withres
- the objects to downloadIOException
public int run() throws IOException
FilterCommand.in
and to write the result to FilterCommand.out
. It returns the
number of bytes it read from FilterCommand.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
FilterCommand.in
and FilterCommand.out
are closed by the implementation.
run
in class FilterCommand
InputStream
or
-1. -1 means that the InputStream
is completely
processed.IOException
- when IOException
occurred while reading from
FilterCommand.in
or writing to FilterCommand.out
Copyright © 2019 Eclipse JGit Project. All rights reserved.