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 TypeMethodDescriptionlonglongMethods inherited from class org.springframework.core.io.AbstractResource
createRelative, equals, exists, getFile, getFileForLastModifiedCheck, getFilename, getURI, getURL, hashCode, isFile, isOpen, isReadable, readableChannel, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.io.Resource
getContentAsByteArray, getContentAsString, getFilePath
-
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:
contentLengthin interfaceorg.springframework.core.io.Resource- Overrides:
contentLengthin classorg.springframework.core.io.AbstractResource
-
lastModified
- Specified by:
lastModifiedin interfaceorg.springframework.core.io.Resource- Overrides:
lastModifiedin classorg.springframework.core.io.AbstractResource- Throws:
IOException
-