org.codehaus.groovy.grails.support
Class GrailsByteArrayResource
java.lang.Object
org.springframework.core.io.AbstractResource
org.springframework.core.io.ByteArrayResource
org.codehaus.groovy.grails.support.GrailsByteArrayResource
- All Implemented Interfaces:
- org.springframework.core.io.InputStreamSource, org.springframework.core.io.Resource
public class GrailsByteArrayResource
- extends org.springframework.core.io.ByteArrayResource
Hacky version of the ByteArrayResource that implements the getURL()
method, required for the resource to work with Spring's
ServletContextResource.
- Author:
- pledbrook
Method Summary |
java.net.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 org.springframework.core.io.ByteArrayResource |
equals, exists, getByteArray, getDescription, getInputStream, hashCode |
Methods inherited from class org.springframework.core.io.AbstractResource |
createRelative, getFile, getFileForLastModifiedCheck, getFilename, getURI, isOpen, isReadable, lastModified, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
GrailsByteArrayResource
public GrailsByteArrayResource(byte[] byteArray)
GrailsByteArrayResource
public GrailsByteArrayResource(byte[] byteArray,
java.lang.String location)
getURL
public java.net.URL getURL()
throws java.io.IOException
- Overrides the default behaviour to generate a fake "file:" URL
so that the resource can be used from a ServletContextResource.
- Specified by:
getURL
in interface org.springframework.core.io.Resource
- Overrides:
getURL
in class org.springframework.core.io.AbstractResource
- Throws:
java.io.IOException
Copyright (c) 2005-2006 The Grails project