com.caucho.server.repository
Class SendFile

java.lang.Object
  extended by com.caucho.server.repository.SendFile
All Implemented Interfaces:
BamLargePayload, java.io.Serializable

public class SendFile
extends java.lang.Object
implements BamLargePayload, java.io.Serializable

Sends a git file. The source can only be read once.

See Also:
Serialized Form

Constructor Summary
SendFile(java.lang.String sha1, StreamSource source)
          Creates a notification message
 
Method Summary
 java.io.InputStream getInputStream()
          Returns the content, freeing it as it's read.
 java.lang.String getSha1()
          Returns the sha1 hash of the file that's been changed.
 java.io.InputStream openInputStream()
          Opens the content for reading, allowing multiple reads.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SendFile

public SendFile(java.lang.String sha1,
                StreamSource source)
Creates a notification message

Method Detail

getSha1

public java.lang.String getSha1()
Returns the sha1 hash of the file that's been changed.


getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Returns the content, freeing it as it's read.

Throws:
java.io.IOException

openInputStream

public java.io.InputStream openInputStream()
                                    throws java.io.IOException
Opens the content for reading, allowing multiple reads.

Throws:
java.io.IOException

toString

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