org.eclipse.jgit.api
Class ApplyCommand

java.lang.Object
  extended by org.eclipse.jgit.api.GitCommand<ApplyResult>
      extended by org.eclipse.jgit.api.ApplyCommand
All Implemented Interfaces:
Callable<ApplyResult>

public class ApplyCommand
extends GitCommand<ApplyResult>

Apply a patch to files and/or to the index.

Since:
2.0
See Also:
Git documentation about apply

Field Summary
 
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
 
Method Summary
 ApplyResult call()
          Executes the ApplyCommand command with all the options and parameters collected by the setter methods (e.g.
 ApplyCommand setPatch(InputStream in)
           
 
Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setPatch

public ApplyCommand setPatch(InputStream in)
Parameters:
in - the patch to apply
Returns:
this instance

call

public ApplyResult call()
                 throws GitAPIException,
                        PatchFormatException,
                        PatchApplyException
Executes the ApplyCommand command with all the options and parameters collected by the setter methods (e.g. setPatch(InputStream) of this class. Each instance of this class should only be used for one invocation of the command. Don't call this method twice on an instance.

Specified by:
call in interface Callable<ApplyResult>
Specified by:
call in class GitCommand<ApplyResult>
Returns:
an ApplyResult object representing the command result
Throws:
GitAPIException
PatchFormatException
PatchApplyException


Copyright © 2012. All Rights Reserved.