public class GrailsByteArrayResource extends ByteArrayResource
Hacky version of the ByteArrayResource that implements the getURL() method, required for the resource to work with Spring's ServletContextResource.
Constructor and description |
---|
GrailsByteArrayResource(byte[] byteArray) |
GrailsByteArrayResource(byte[] byteArray, String location) |
Type Params | Return Type | Name and description |
---|---|---|
|
public String |
getFilename() |
|
public URL |
getURL() Overrides the default behaviour to generate a fake "file:" URL so that the resource can be used from a ServletContextResource. |
Methods inherited from class | Name |
---|---|
class ByteArrayResource |
contentLength, createRelative, equals, exists, getByteArray, getClass, getContentAsByteArray, getContentAsString, getDescription, getFile, getFilename, getInputStream, getURI, getURL, hashCode, isFile, isOpen, isReadable, lastModified, notify, notifyAll, readableChannel, toString, wait, wait, wait |