com.caucho.env.git
Class GitCommitTree

java.lang.Object
  extended by com.caucho.env.git.GitCommitTree

public class GitCommitTree
extends java.lang.Object

Tree structure


Constructor Summary
GitCommitTree()
           
 
Method Summary
 java.lang.String addFile(java.lang.String path, int mode, java.io.InputStream is, long length)
          Adds a file to the commit tree
 java.lang.String addFile(java.lang.String treePath, int mode, Path filePath)
          Adds a file to the commit tree
static java.lang.String calculateBlobDigest(java.io.InputStream is, long length)
           
 java.lang.String commit()
          Commits the tree by calculating the directory hashes
 java.lang.String findPath(java.lang.String sha1)
          Finds the file path given the sha1
 GitWorkingTree findTree(java.lang.String path)
          Finds the directory given the path
 java.lang.String[] getCommitList()
          Returns the commit list
 java.lang.String getDigest()
           
 java.lang.String toString()
           
static java.io.InputStream writeBlob(java.io.InputStream is, long length)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GitCommitTree

public GitCommitTree()
Method Detail

addFile

public java.lang.String addFile(java.lang.String treePath,
                                int mode,
                                Path filePath)
                         throws java.io.IOException
Adds a file to the commit tree

Throws:
java.io.IOException

addFile

public java.lang.String addFile(java.lang.String path,
                                int mode,
                                java.io.InputStream is,
                                long length)
                         throws java.io.IOException
Adds a file to the commit tree

Throws:
java.io.IOException

findPath

public java.lang.String findPath(java.lang.String sha1)
Finds the file path given the sha1


findTree

public GitWorkingTree findTree(java.lang.String path)
Finds the directory given the path


commit

public java.lang.String commit()
Commits the tree by calculating the directory hashes


getDigest

public java.lang.String getDigest()

getCommitList

public java.lang.String[] getCommitList()
Returns the commit list


calculateBlobDigest

public static java.lang.String calculateBlobDigest(java.io.InputStream is,
                                                   long length)
                                            throws java.io.IOException
Throws:
java.io.IOException

writeBlob

public static java.io.InputStream writeBlob(java.io.InputStream is,
                                            long length)
                                     throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object