Package org.craftercms.core.service.impl
Class ResourceBasedContent
java.lang.Object
org.craftercms.core.service.impl.ResourceBasedContent
- All Implemented Interfaces:
Content
Implementation of
Content that relies on a Resource- Since:
- 3.1.6
- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.core.io.ResourceThe resource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns aInputStreamfor the data.longReturns the last modified date of the content.longReturns the content length.
-
Field Details
-
resource
protected org.springframework.core.io.Resource resourceThe resource
-
-
Constructor Details
-
ResourceBasedContent
public ResourceBasedContent(org.springframework.core.io.Resource resource)
-
-
Method Details
-
getLastModified
public long getLastModified()Description copied from interface:ContentReturns the last modified date of the content.- Specified by:
getLastModifiedin interfaceContent
-
getLength
public long getLength()Description copied from interface:ContentReturns the content length. -
getInputStream
Description copied from interface:ContentReturns aInputStreamfor the data.- Specified by:
getInputStreamin interfaceContent- Throws:
IOException
-