Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.grails.support
Class MockFileResource

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

All Implemented Interfaces:
  InputStreamSource, Resource

    public class MockFileResource

extends ByteArrayResource

Mocks the behavior of a FileResource.

Since:
  1.1
Author:
  Graeme Rocher

Constructor Summary
`MockFileResource(String fileName, String contents)`
`MockFileResource(String fileName, String contents, String encoding)`

Method Summary
`String` | `getFilename()`

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, getURI, getURL, isOpen, isReadable, lastModified, toString`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### MockFileResource

    public MockFileResource(String fileName,
                            String contents)
                     throws UnsupportedEncodingException

Throws:
  `UnsupportedEncodingException`

### MockFileResource

    public MockFileResource(String fileName,
                            String contents,
                            String encoding)
                     throws UnsupportedEncodingException

Throws:
  `UnsupportedEncodingException`

Method Detail

### getFilename

    public String getFilename()

  Specified by:
    `getFilename` in interface `Resource`
  Overrides:
    `getFilename` in class `AbstractResource`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD