public class GrailsByteArrayResource
extends org.springframework.core.io.ByteArrayResource
getURL() method, required for the resource to work with Spring's
ServletContextResource.| Constructor and Description |
|---|
GrailsByteArrayResource(byte[] byteArray) |
GrailsByteArrayResource(byte[] byteArray,
java.lang.String location) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFilename() |
java.net.URL |
getURL()
Overrides the default behaviour to generate a fake "file:" URL
so that the resource can be used from a ServletContextResource.
|
contentLength, equals, exists, getByteArray, getDescription, getInputStream, hashCodepublic GrailsByteArrayResource(byte[] byteArray)
public GrailsByteArrayResource(byte[] byteArray,
java.lang.String location)
public java.net.URL getURL()
throws java.io.IOException
getURL in interface org.springframework.core.io.ResourcegetURL in class org.springframework.core.io.AbstractResourcejava.io.IOExceptionpublic java.lang.String getFilename()
throws java.lang.IllegalStateException
getFilename in interface org.springframework.core.io.ResourcegetFilename in class org.springframework.core.io.AbstractResourcejava.lang.IllegalStateException