Package: org.grails.core.io

## [Java] Class GrailsByteArrayResource

- org.grails.core.io.GrailsByteArrayResource

- Hacky version of the ByteArrayResource that implements the getURL() method, required for the resource to work with Spring's ServletContextResource.

  Authors:
    pledbrook

- - ### Constructor Summary

    Constructors
    Constructor and description
    `GrailsByteArrayResource (byte[] byteArray)`
    `GrailsByteArrayResource (byte[] byteArray, java.lang.String location)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name 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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class org.springframework.core.io.ByteArrayResource` | `org.springframework.core.io.ByteArrayResource#contentLength(), org.springframework.core.io.ByteArrayResource#getByteArray(), org.springframework.core.io.ByteArrayResource#getDescription(), 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#createRelative(java.lang.String), org.springframework.core.io.ByteArrayResource#isReadable(), org.springframework.core.io.ByteArrayResource#getURI(), org.springframework.core.io.ByteArrayResource#getFilename(), org.springframework.core.io.ByteArrayResource#toString(), org.springframework.core.io.ByteArrayResource#getURL(), org.springframework.core.io.ByteArrayResource#isOpen(), org.springframework.core.io.ByteArrayResource#lastModified(), org.springframework.core.io.ByteArrayResource#getFile(), org.springframework.core.io.ByteArrayResource#wait(long, int), org.springframework.core.io.ByteArrayResource#wait(long), org.springframework.core.io.ByteArrayResource#wait(), org.springframework.core.io.ByteArrayResource#getClass(), org.springframework.core.io.ByteArrayResource#notify(), org.springframework.core.io.ByteArrayResource#notifyAll()`
    `class org.springframework.core.io.AbstractResource` | `org.springframework.core.io.AbstractResource#contentLength(), org.springframework.core.io.AbstractResource#createRelative(java.lang.String), org.springframework.core.io.AbstractResource#isReadable(), org.springframework.core.io.AbstractResource#getURI(), org.springframework.core.io.AbstractResource#getFilename(), 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#exists(), org.springframework.core.io.AbstractResource#getURL(), org.springframework.core.io.AbstractResource#isOpen(), org.springframework.core.io.AbstractResource#lastModified(), org.springframework.core.io.AbstractResource#getFile(), org.springframework.core.io.AbstractResource#wait(long, int), org.springframework.core.io.AbstractResource#wait(long), org.springframework.core.io.AbstractResource#wait(), 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

    - #### public GrailsByteArrayResource(byte[] byteArray)

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

  - ### Method Detail

    - #### @java.lang.Override public java.lang.String getFilename()

    - #### @java.lang.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.