public static class RepoCommand.DefaultRemoteReader extends Object implements RepoCommand.RemoteReader
RepoCommand.RemoteReader callback.| Constructor and Description |
|---|
RepoCommand.DefaultRemoteReader() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
readFile(String uri,
String ref,
String path)
Read a file from a remote repository.
|
protected byte[] |
readFileFromRepo(Repository repo,
String ref,
String path)
Read a file from the repository
|
ObjectId |
sha1(String uri,
String ref)
Read a remote ref sha1.
|
public ObjectId sha1(String uri, 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(String uri, String ref, String path) throws GitAPIException, 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 readGitAPIExceptionIOExceptionprotected byte[] readFileFromRepo(Repository repo, String ref, String path) throws GitAPIException, IOException
repo - The repository containing the fileref - The ref (branch/tag/etc.) to readpath - The relative path (inside the repo) to the file to readGitAPIExceptionIOExceptionCopyright © 2014. All rights reserved.