Class CanonicalTreeParser

java.lang.Object
org.eclipse.jgit.treewalk.AbstractTreeIterator
org.eclipse.jgit.treewalk.CanonicalTreeParser

public class CanonicalTreeParser extends AbstractTreeIterator
Parses raw Git trees from the canonical semi-text/semi-binary format.
  • Constructor Details

    • CanonicalTreeParser

      public CanonicalTreeParser()
      Create a new parser.
    • CanonicalTreeParser

      public CanonicalTreeParser(byte[] prefix, ObjectReader reader, AnyObjectId treeId) throws IncorrectObjectTypeException, IOException
      Create a new parser for a tree appearing in a subset of a repository.
      Parameters:
      prefix - position of this iterator in the repository tree. The value may be null or the empty array to indicate the prefix is the root of the repository. A trailing slash ('/') is automatically appended if the prefix does not end in '/'.
      reader - reader to load the tree data from.
      treeId - identity of the tree being parsed; used only in exception messages if data corruption is found.
      Throws:
      MissingObjectException - the object supplied is not available from the repository.
      IncorrectObjectTypeException - the object supplied as an argument is not actually a tree and cannot be parsed as though it were a tree.
      IOException - a loose object or pack file could not be read.
  • Method Details