Class TransformedResource
java.lang.Object
org.springframework.core.io.AbstractResource
org.springframework.core.io.ByteArrayResource
org.springframework.web.reactive.resource.TransformedResource
- All Implemented Interfaces:
InputStreamSource, Resource
An extension of
ByteArrayResource that a ResourceTransformer
can use to represent an original resource preserving all other information
except the content.- Since:
- 5.0
- Author:
- Rossen Stoyanchev
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis implementation always returnsnull, assuming that this resource type does not have a filename.longThis implementation checks the timestamp of the underlying File, if available.Methods inherited from class ByteArrayResource
contentLength, equals, exists, getByteArray, getContentAsByteArray, getContentAsString, getDescription, getInputStream, hashCodeMethods inherited from class AbstractResource
createRelative, getFile, getFileForLastModifiedCheck, getURI, getURL, isFile, isOpen, isReadable, readableChannel, toStringMethods inherited from interface Resource
getFilePath
-
Constructor Details
-
TransformedResource
-
-
Method Details
-
getFilename
Description copied from class:AbstractResourceThis implementation always returnsnull, assuming that this resource type does not have a filename.- Specified by:
getFilenamein interfaceResource- Overrides:
getFilenamein classAbstractResource
-
lastModified
public long lastModified()Description copied from class:AbstractResourceThis implementation checks the timestamp of the underlying File, if available.- Specified by:
lastModifiedin interfaceResource- Overrides:
lastModifiedin classAbstractResource- See Also:
-