public static class RepoCommand.DefaultRemoteReader extends java.lang.Object implements RepoCommand.RemoteReader
RepoCommand.RemoteReader callback.| Constructor and Description |
|---|
DefaultRemoteReader() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
readFile(java.lang.String uri,
java.lang.String ref,
java.lang.String path)
Read a file from a remote repository.
|
protected byte[] |
readFileFromRepo(Repository repo,
java.lang.String ref,
java.lang.String path)
Read a file from the repository
|
ObjectId |
sha1(java.lang.String uri,
java.lang.String ref)
Read a remote ref sha1.
|
public ObjectId sha1(java.lang.String uri, java.lang.String ref) throws GitAPIException
RepoCommand.RemoteReadersha1 in interface RepoCommand.RemoteReaderuri - The URI of the remote repositoryref - The ref (branch/tag/etc.) to readGitAPIExceptionpublic byte[] readFile(java.lang.String uri,
java.lang.String ref,
java.lang.String path)
throws GitAPIException,
java.io.IOException
RepoCommand.RemoteReaderreadFile in interface RepoCommand.RemoteReaderuri - The URI of the remote repositoryref - The ref (branch/tag/etc.) to readpath - The relative path (inside the repo) to the file to readGitAPIExceptionjava.io.IOExceptionprotected byte[] readFileFromRepo(Repository repo, java.lang.String ref, java.lang.String path) throws GitAPIException, java.io.IOException
repo - The repository containing the fileref - The ref (branch/tag/etc.) to readpath - The relative path (inside the repo) to the file to readGitAPIExceptionjava.io.IOException