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 ofAbstractResource
that wraps anObjectLoader
from JGit- Since:
- 4.0.0
- Author:
- joseross
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.jgit.lib.ObjectLoader
objectLoader
-
Constructor Summary
Constructors Constructor Description GitResource(org.eclipse.jgit.lib.ObjectLoader objectLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
contentLength()
String
getDescription()
InputStream
getInputStream()
long
lastModified()
-
-
-
Method Detail
-
getDescription
public String getDescription()
-
getInputStream
public InputStream getInputStream() throws IOException
- Throws:
IOException
-
contentLength
public long contentLength()
- Specified by:
contentLength
in interfaceorg.springframework.core.io.Resource
- Overrides:
contentLength
in classorg.springframework.core.io.AbstractResource
-
lastModified
public long lastModified() throws IOException
- Specified by:
lastModified
in interfaceorg.springframework.core.io.Resource
- Overrides:
lastModified
in classorg.springframework.core.io.AbstractResource
- Throws:
IOException
-
-