GrailsMockMultipartFile (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.plugins.testing
[Java] Class GrailsMockMultipartFile

    java.lang.Object
      org.springframework.mock.web.MockMultipartFile
          org.codehaus.groovy.grails.plugins.testing.GrailsMockMultipartFile

    public class GrailsMockMultipartFile
    extends org.springframework.mock.web.MockMultipartFile

Extends the default Spring MockMultipartFile to provide an implementation of transferTo that doesn't use the file system.

Authors:
  Graeme Rocher

Since:
  2.0

Constructor Summary
`GrailsMockMultipartFile(java.lang.String name, byte[] content)`
`GrailsMockMultipartFile(java.lang.String name, java.io.InputStream contentStream)`
`GrailsMockMultipartFile(java.lang.String name, java.lang.String originalFilename, java.lang.String contentType, byte[] content)`
`GrailsMockMultipartFile(java.lang.String name, java.lang.String originalFilename, java.lang.String contentType, java.io.InputStream contentStream)`

Method Summary
`java.io.File` | `getTargetFileLocation()` @return The location where the MultipartFile was transfered to
`void` | `transferTo(java.io.File dest)`

Methods inherited from class org.springframework.mock.web.MockMultipartFile
org.springframework.mock.web.MockMultipartFile#getInputStream(), org.springframework.mock.web.MockMultipartFile#getContentType(), org.springframework.mock.web.MockMultipartFile#getName(), org.springframework.mock.web.MockMultipartFile#isEmpty(), org.springframework.mock.web.MockMultipartFile#getBytes(), org.springframework.mock.web.MockMultipartFile#getSize(), org.springframework.mock.web.MockMultipartFile#transferTo(java.io.File), org.springframework.mock.web.MockMultipartFile#getOriginalFilename(), org.springframework.mock.web.MockMultipartFile#wait(long, int), org.springframework.mock.web.MockMultipartFile#wait(long), org.springframework.mock.web.MockMultipartFile#wait(), org.springframework.mock.web.MockMultipartFile#equals(java.lang.Object), org.springframework.mock.web.MockMultipartFile#toString(), org.springframework.mock.web.MockMultipartFile#hashCode(), org.springframework.mock.web.MockMultipartFile#getClass(), org.springframework.mock.web.MockMultipartFile#notify(), org.springframework.mock.web.MockMultipartFile#notifyAll()

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()

Constructor Detail

### GrailsMockMultipartFile

    public GrailsMockMultipartFile(java.lang.String name, byte[] content)

### GrailsMockMultipartFile

    public GrailsMockMultipartFile(java.lang.String name, java.io.InputStream contentStream)

### GrailsMockMultipartFile

    public GrailsMockMultipartFile(java.lang.String name, java.lang.String originalFilename, java.lang.String contentType, byte[] content)

### GrailsMockMultipartFile

    public GrailsMockMultipartFile(java.lang.String name, java.lang.String originalFilename, java.lang.String contentType, java.io.InputStream contentStream)

Method Detail

### getTargetFileLocation

    public java.io.File getTargetFileLocation()

  Returns:
    The location where the MultipartFile was transfered to

### transferTo

    @java.lang.Override
    public void transferTo(java.io.File dest)

Groovy Documentation