ByteArrayResource (Grails 2.3.8)
Date: 2014-04-24

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

## org.codehaus.groovy.grails.io.support
[Groovy] Class ByteArrayResource

    java.lang.Object
      org.codehaus.groovy.grails.io.support.ByteArrayResource

All Implemented Interfaces:
  Resource

    @groovy.transform.CompileStatic
    class ByteArrayResource
    extends java.lang.Object

A Resource impl used represent a Resource as an array of bytes

Property Summary
`byte[]` | `bytes`
`java.lang.String` | `description`

Constructor Summary
`ByteArrayResource(byte[] bytes)`
`ByteArrayResource(byte[] bytes, java.lang.String desc)`

Method Summary
`long` | `contentLength()`
`Resource` | `createRelative(java.lang.String relativePath)`
`boolean` | `exists()`
`java.io.File` | `getFile()`
`java.lang.String` | `getFilename()`
`java.io.InputStream` | `getInputStream()`
`java.net.URI` | `getURI()`
`java.net.URL` | `getURL()`
`boolean` | `isReadable()`
`long` | `lastModified()`

Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()

Property Detail

### bytes

    byte[] bytes

### description

    java.lang.String description

Constructor Detail

### ByteArrayResource

    ByteArrayResource(byte[] bytes)

### ByteArrayResource

    ByteArrayResource(byte[] bytes, java.lang.String desc)

Method Detail

### contentLength

    long contentLength()

### createRelative

    Resource createRelative(java.lang.String relativePath)

### exists

    boolean exists()

### getFile

    java.io.File getFile()

### getFilename

    java.lang.String getFilename()

### getInputStream

    java.io.InputStream getInputStream()

### getURI

    java.net.URI getURI()

### getURL

    java.net.URL getURL()

### isReadable

    boolean isReadable()

### lastModified

    long lastModified()

Groovy Documentation