com.caucho.env.git
Class GitObjectStream

java.lang.Object
  extended by java.io.InputStream
      extended by com.caucho.env.git.GitObjectStream
All Implemented Interfaces:
java.io.Closeable

public class GitObjectStream
extends java.io.InputStream

Top-level class for a repository


Constructor Summary
GitObjectStream(java.io.InputStream rawStream)
           
GitObjectStream(Path path)
           
 
Method Summary
 void close()
           
 java.io.InputStream getInputStream()
           
 long getLength()
           
 GitType getType()
           
 GitCommit parseCommit()
           
 GitTree parseTree()
           
 int read()
           
 int read(byte[] buffer, int offset, int length)
           
 java.lang.String toString()
           
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GitObjectStream

public GitObjectStream(Path path)
                throws java.io.IOException
Throws:
java.io.IOException

GitObjectStream

public GitObjectStream(java.io.InputStream rawStream)
                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getType

public GitType getType()

getLength

public long getLength()

parseCommit

public GitCommit parseCommit()
                      throws java.io.IOException
Throws:
java.io.IOException

parseTree

public GitTree parseTree()
                  throws java.io.IOException
Throws:
java.io.IOException

getInputStream

public java.io.InputStream getInputStream()

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] buffer,
                int offset,
                int length)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException

close

public void close()
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream

toString

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