Class TransformedResource
java.lang.Object
org.springframework.core.io.AbstractResource
org.springframework.core.io.ByteArrayResource
org.springframework.web.reactive.resource.TransformedResource
- All Implemented Interfaces:
org.springframework.core.io.InputStreamSource
,org.springframework.core.io.Resource
public class TransformedResource
extends org.springframework.core.io.ByteArrayResource
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
ConstructorDescriptionTransformedResource
(org.springframework.core.io.Resource original, byte[] transformedContent) -
Method Summary
Methods inherited from class org.springframework.core.io.ByteArrayResource
contentLength, equals, exists, getByteArray, getDescription, getInputStream, hashCode
Methods inherited from class org.springframework.core.io.AbstractResource
createRelative, getFile, getFileForLastModifiedCheck, getURI, getURL, isFile, isOpen, isReadable, readableChannel, toString
-
Constructor Details
-
TransformedResource
public TransformedResource(org.springframework.core.io.Resource original, byte[] transformedContent)
-
-
Method Details
-
getFilename
- Specified by:
getFilename
in interfaceorg.springframework.core.io.Resource
- Overrides:
getFilename
in classorg.springframework.core.io.AbstractResource
-
lastModified
public long lastModified()- Specified by:
lastModified
in interfaceorg.springframework.core.io.Resource
- Overrides:
lastModified
in classorg.springframework.core.io.AbstractResource
-