Class RepoCommand.DefaultRemoteReader

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultRemoteReader

        public DefaultRemoteReader()
    • Method Detail

      • readFile

        public byte[] readFile​(java.lang.String uri,
                               java.lang.String ref,
                               java.lang.String path)
                        throws GitAPIException,
                               java.io.IOException
        Description copied from interface: RepoCommand.RemoteReader
        Read a file from a remote repository.
        Specified by:
        readFile in interface RepoCommand.RemoteReader
        Parameters:
        uri - The URI of the remote repository
        ref - The ref (branch/tag/etc.) to read
        path - The relative path (inside the repo) to the file to read
        Returns:
        the file content.
        Throws:
        GitAPIException
        java.io.IOException
      • readFileFromRepo

        protected byte[] readFileFromRepo​(Repository repo,
                                          java.lang.String ref,
                                          java.lang.String path)
                                   throws GitAPIException,
                                          java.io.IOException
        Read a file from the repository
        Parameters:
        repo - The repository containing the file
        ref - The ref (branch/tag/etc.) to read
        path - The relative path (inside the repo) to the file to read
        Returns:
        the file's content
        Throws:
        GitAPIException
        java.io.IOException
        Since:
        3.5