org.kuali.rice.kew.test.web
Class MockFormFile
java.lang.Object
org.kuali.rice.kew.test.web.MockFormFile
- All Implemented Interfaces:
- org.apache.struts.upload.FormFile
public class MockFormFile
- extends Object
- implements org.apache.struts.upload.FormFile
A mock FormFile which is constructed directly from a File on disk
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
MockFormFile
public MockFormFile(File file)
getContentType
public String getContentType()
- Specified by:
getContentType
in interface org.apache.struts.upload.FormFile
setContentType
public void setContentType(String contentType)
- Specified by:
setContentType
in interface org.apache.struts.upload.FormFile
getFileData
public byte[] getFileData()
throws FileNotFoundException,
IOException
- Specified by:
getFileData
in interface org.apache.struts.upload.FormFile
- Throws:
FileNotFoundException
IOException
getFileName
public String getFileName()
- Specified by:
getFileName
in interface org.apache.struts.upload.FormFile
setFileName
public void setFileName(String fileName)
- Specified by:
setFileName
in interface org.apache.struts.upload.FormFile
getFileSize
public int getFileSize()
- Specified by:
getFileSize
in interface org.apache.struts.upload.FormFile
setFileSize
public void setFileSize(int fileSize)
- Specified by:
setFileSize
in interface org.apache.struts.upload.FormFile
getInputStream
public InputStream getInputStream()
throws FileNotFoundException,
IOException
- Specified by:
getInputStream
in interface org.apache.struts.upload.FormFile
- Throws:
FileNotFoundException
IOException
destroy
public void destroy()
- Specified by:
destroy
in interface org.apache.struts.upload.FormFile
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.