public class SmudgeFilter extends FilterCommand
| Modifier and Type | Field and Description |
|---|---|
static FilterCommandFactory |
FACTORY
The factory is responsible for creating instances of
SmudgeFilter |
private static int |
MAX_COPY_BYTES
Max number of bytes to copy in a single
run() call. |
in, out| Constructor and Description |
|---|
SmudgeFilter(Repository db,
java.io.InputStream in,
java.io.OutputStream out)
Constructor for SmudgeFilter.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.Collection<java.nio.file.Path> |
downloadLfsResource(Lfs lfs,
Repository db,
LfsPointer... res)
Download content which is hosted on a LFS server
|
(package private) static void |
register()
Register this filter in JGit
|
int |
run()
Execute the command.
|
private static final int MAX_COPY_BYTES
run() call.public static final FilterCommandFactory FACTORY
SmudgeFilterpublic SmudgeFilter(Repository db, java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
db - a Repository object.in - a InputStream object. The stream is closed in
any case.out - a OutputStream object.java.io.IOException - in case of an errorstatic void register()
public static java.util.Collection<java.nio.file.Path> downloadLfsResource(Lfs lfs, Repository db, LfsPointer... res) throws java.io.IOException
lfs - local Lfs storage.db - the repository to work withres - the objects to downloadjava.io.IOExceptionpublic int run()
throws java.io.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 FilterCommandInputStream or
-1. -1 means that the InputStream is completely
processed.java.io.IOException - when IOException occured while reading from
FilterCommand.in or writing to FilterCommand.out