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 |
---|---|
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 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 IOException
AbstractResource
lastModified
in interface Resource
lastModified
in class AbstractResource
IOException
- if the resource cannot be resolved
(in the file system or as some other known physical resource type)AbstractResource.getFileForLastModifiedCheck()