Interface Resource
- All Known Implementing Classes:
ByteArrayResource,ClassPathResource,FileResource,InputStreamResource,ResourceWrapper
public interface Resource
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault ResourceasAttachment(boolean attachment) default Resourcedefault Filedefault Datedefault Datedefault longdefault Stringdefault StringgetName()default booleandefault ResourcelastModified(Date lastModifiedDate) default ResourcewithMimeType(String mimeType)
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER
-
-
Method Details
-
getInputStream
InputStream getInputStream() -
getLength
default long getLength() -
getName
-
getLastModified
-
getExpires
-
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
-
lastModified
-
expiring
-
withMimeType
-
asAttachment
-