Class GitResource

  • All Implemented Interfaces:
    org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

    public class GitResource
    extends org.springframework.core.io.AbstractResource
    Implementation of AbstractResource that wraps an ObjectLoader from JGit
    Since:
    4.0.0
    Author:
    joseross
    • Field Detail

      • objectLoader

        protected final org.eclipse.jgit.lib.ObjectLoader objectLoader
    • Constructor Detail

      • GitResource

        public GitResource​(org.eclipse.jgit.lib.ObjectLoader objectLoader)
    • Method Detail

      • getDescription

        public String getDescription()
      • contentLength

        public long contentLength()
        Specified by:
        contentLength in interface org.springframework.core.io.Resource
        Overrides:
        contentLength in class org.springframework.core.io.AbstractResource
      • lastModified

        public long lastModified()
                          throws IOException
        Specified by:
        lastModified in interface org.springframework.core.io.Resource
        Overrides:
        lastModified in class org.springframework.core.io.AbstractResource
        Throws:
        IOException