Class ContentResource

java.lang.Object
org.springframework.core.io.AbstractResource
org.craftercms.search.commons.utils.ContentResource
All Implemented Interfaces:
org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource

public class ContentResource extends org.springframework.core.io.AbstractResource
A Resource that's basically a facade to a Content object.
Author:
avasquez
  • Constructor Details

    • ContentResource

      public ContentResource(org.craftercms.core.service.Content content, String filename)
  • Method Details

    • getDescription

      public String getDescription()
    • getFilename

      public String getFilename()
      Specified by:
      getFilename in interface org.springframework.core.io.Resource
      Overrides:
      getFilename in class org.springframework.core.io.AbstractResource
    • exists

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

      public long contentLength() throws IOException
      Specified by:
      contentLength in interface org.springframework.core.io.Resource
      Overrides:
      contentLength in class org.springframework.core.io.AbstractResource
      Throws:
      IOException
    • 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
    • getInputStream

      public InputStream getInputStream() throws IOException
      Throws:
      IOException