public class TransformedResource extends ByteArrayResource
ByteArrayResource
that a
ResourceTransformer
can use to represent an original resource
preserving all other information except the content.Constructor and Description |
---|
TransformedResource(Resource original,
byte[] transformedContent) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFilename()
This implementation always returns
null ,
assuming that this resource type does not have a filename. |
long |
lastModified()
This implementation checks the timestamp of the underlying File,
if available.
|
contentLength, equals, exists, getByteArray, getDescription, getInputStream, hashCode
createRelative, getFile, getFileForLastModifiedCheck, getURI, getURL, isOpen, isReadable, toString
public TransformedResource(Resource original, byte[] transformedContent)
public java.lang.String getFilename()
AbstractResource
null
,
assuming that this resource type does not have a filename.getFilename
in interface Resource
getFilename
in class AbstractResource
public long lastModified() throws java.io.IOException
AbstractResource
lastModified
in interface Resource
lastModified
in class AbstractResource
java.io.IOException
- if the resource cannot be resolved
(in the file system or as some other known physical resource type)AbstractResource.getFileForLastModifiedCheck()