Class GitResource
java.lang.Object
org.springframework.core.io.AbstractResource
org.craftercms.studio.impl.v2.repository.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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
long
Methods inherited from class org.springframework.core.io.AbstractResource
createRelative, equals, exists, getFile, getFileForLastModifiedCheck, getFilename, getURI, getURL, hashCode, isFile, isOpen, isReadable, readableChannel, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.core.io.Resource
getContentAsByteArray, getContentAsString
-
Field Details
-
objectLoader
protected final org.eclipse.jgit.lib.ObjectLoader objectLoader
-
-
Constructor Details
-
GitResource
public GitResource(org.eclipse.jgit.lib.ObjectLoader objectLoader)
-
-
Method Details
-
getDescription
-
getInputStream
- Throws:
IOException
-
contentLength
public long contentLength()- Specified by:
contentLength
in interfaceorg.springframework.core.io.Resource
- Overrides:
contentLength
in classorg.springframework.core.io.AbstractResource
-
lastModified
- Specified by:
lastModified
in interfaceorg.springframework.core.io.Resource
- Overrides:
lastModified
in classorg.springframework.core.io.AbstractResource
- Throws:
IOException
-