Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.support
[Java] Class GrailsByteArrayResource

    java.lang.Object
      org.springframework.core.io.AbstractResource
          org.springframework.core.io.ByteArrayResource
              org.codehaus.groovy.grails.support.GrailsByteArrayResource

    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.

Authors:
  pledbrook

Constructor Summary
`GrailsByteArrayResource(byte[] byteArray)`
`GrailsByteArrayResource(byte[] byteArray, java.lang.String location)`

Method Summary
`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.

Methods inherited from class org.springframework.core.io.ByteArrayResource
org.springframework.core.io.ByteArrayResource#equals(java.lang.Object), org.springframework.core.io.ByteArrayResource#hashCode(), org.springframework.core.io.ByteArrayResource#exists(), org.springframework.core.io.ByteArrayResource#getInputStream(), org.springframework.core.io.ByteArrayResource#contentLength(), org.springframework.core.io.ByteArrayResource#getDescription(), org.springframework.core.io.ByteArrayResource#getByteArray(), org.springframework.core.io.ByteArrayResource#toString(), org.springframework.core.io.ByteArrayResource#getURL(), org.springframework.core.io.ByteArrayResource#lastModified(), org.springframework.core.io.ByteArrayResource#getFile(), org.springframework.core.io.ByteArrayResource#isOpen(), org.springframework.core.io.ByteArrayResource#getURI(), org.springframework.core.io.ByteArrayResource#isReadable(), org.springframework.core.io.ByteArrayResource#getFilename(), org.springframework.core.io.ByteArrayResource#createRelative(java.lang.String), org.springframework.core.io.ByteArrayResource#wait(), org.springframework.core.io.ByteArrayResource#wait(long), org.springframework.core.io.ByteArrayResource#wait(long, int), org.springframework.core.io.ByteArrayResource#getClass(), org.springframework.core.io.ByteArrayResource#notify(), org.springframework.core.io.ByteArrayResource#notifyAll()

Methods inherited from class org.springframework.core.io.AbstractResource
org.springframework.core.io.AbstractResource#equals(java.lang.Object), org.springframework.core.io.AbstractResource#toString(), org.springframework.core.io.AbstractResource#hashCode(), org.springframework.core.io.AbstractResource#getURL(), org.springframework.core.io.AbstractResource#exists(), org.springframework.core.io.AbstractResource#lastModified(), org.springframework.core.io.AbstractResource#getFile(), org.springframework.core.io.AbstractResource#isOpen(), org.springframework.core.io.AbstractResource#contentLength(), org.springframework.core.io.AbstractResource#getURI(), org.springframework.core.io.AbstractResource#isReadable(), org.springframework.core.io.AbstractResource#getFilename(), org.springframework.core.io.AbstractResource#createRelative(java.lang.String), org.springframework.core.io.AbstractResource#wait(), org.springframework.core.io.AbstractResource#wait(long), org.springframework.core.io.AbstractResource#wait(long, int), org.springframework.core.io.AbstractResource#getClass(), org.springframework.core.io.AbstractResource#notify(), org.springframework.core.io.AbstractResource#notifyAll(), org.springframework.core.io.AbstractResource#getDescription(), org.springframework.core.io.AbstractResource#getInputStream()

Constructor Detail

### GrailsByteArrayResource

    public GrailsByteArrayResource(byte[] byteArray)

### GrailsByteArrayResource

    public GrailsByteArrayResource(byte[] byteArray, java.lang.String location)

Method Detail

### getFilename

    @Override
    public java.lang.String getFilename()

### getURL

    @Override
    public java.net.URL getURL()

  Overrides the default behaviour to generate a fake "file:" URL so that the resource can be used from a ServletContextResource.

Groovy Documentation