org.codehaus.groovy.grails.support
Class MockFileResource

java.lang.Object
  extended by org.springframework.core.io.AbstractResource
      extended by org.springframework.core.io.ByteArrayResource
          extended by 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