Interface Resource

All Known Implementing Classes:
ClassPathResource, FileResource

public interface Resource
  • Method Details

    • getInputStream

      java.io.InputStream getInputStream()
    • getLength

      default long getLength()
    • getName

      default java.lang.String getName()
    • getLastModified

      default java.util.Date getLastModified()
    • getExpires

      default java.util.Date getExpires()
    • getMimeType

      default java.lang.String getMimeType()
    • isAttachment

      default boolean isAttachment()
      Returns:
      true if this resource should be handled by the browser by showing a "Save As" dialogue (HTTP header Content-Disposition: attachment), false if the browser should attempt to embed or display the resource directly (HTTP header Content-Disposition: inline).
    • getAsFile

      default java.io.File getAsFile()