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

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 MockFileResource

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

    public class MockFileResource
    extends org.springframework.core.io.ByteArrayResource

Mocks the behavior of a FileResource.

Authors:
  Graeme Rocher

Since:
  1.1

Constructor Summary
`MockFileResource(java.lang.String fileName, java.lang.String contents)`
`MockFileResource(java.lang.String fileName, java.lang.String contents, java.lang.String encoding)`

Method Summary
`java.lang.String` | `getFilename()`

Methods inherited from class org.springframework.core.io.ByteArrayResource
org.springframework.core.io.ByteArrayResource#getInputStream(), org.springframework.core.io.ByteArrayResource#getDescription(), org.springframework.core.io.ByteArrayResource#contentLength(), 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#getByteArray(), org.springframework.core.io.ByteArrayResource#isOpen(), org.springframework.core.io.ByteArrayResource#getFile(), org.springframework.core.io.ByteArrayResource#getURI(), org.springframework.core.io.ByteArrayResource#lastModified(), org.springframework.core.io.ByteArrayResource#toString(), org.springframework.core.io.ByteArrayResource#isReadable(), org.springframework.core.io.ByteArrayResource#getURL(), org.springframework.core.io.ByteArrayResource#getFilename(), org.springframework.core.io.ByteArrayResource#createRelative(java.lang.String), 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()

Methods inherited from class org.springframework.core.io.AbstractResource
org.springframework.core.io.AbstractResource#isOpen(), org.springframework.core.io.AbstractResource#getFile(), org.springframework.core.io.AbstractResource#getURI(), org.springframework.core.io.AbstractResource#lastModified(), org.springframework.core.io.AbstractResource#contentLength(), 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#isReadable(), org.springframework.core.io.AbstractResource#getURL(), org.springframework.core.io.AbstractResource#getFilename(), org.springframework.core.io.AbstractResource#createRelative(java.lang.String), 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

### MockFileResource

    public MockFileResource(java.lang.String fileName, java.lang.String contents)

### MockFileResource

    public MockFileResource(java.lang.String fileName, java.lang.String contents, java.lang.String encoding)

Method Detail

### getFilename

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

Groovy Documentation