| java.lang.Object com.uwyn.rife.test.MockFileUpload
MockFileUpload | public class MockFileUpload (Code) | | An instance of this class provides all the data that is needed to simulate
a file upload.
author: Geert Bevin (gbevin[remove] at uwyn dot com) version: $Revision: 3634 $ since: 1.1 |
Constructor Summary | |
public | MockFileUpload(File file) Creates a new file upload simulation based on a File
object.
The content type will be guessed from the file extension. | public | MockFileUpload(File file, String contentType) Creates a new file upload simulation based on a File
object. | public | MockFileUpload(String fileName, InputStream inputStream, String contentType) Creates a new file upload simulation based on an
InputStream . |
MockFileUpload | public MockFileUpload(File file)(Code) | | Creates a new file upload simulation based on a File
object.
The content type will be guessed from the file extension. The
extension to mime-type mapping is retrieved from
com.uwyn.rife.config.RifeConfig.Mime .
Parameters: file - the file that will be uploaded since: 1.1 |
MockFileUpload | public MockFileUpload(File file, String contentType)(Code) | | Creates a new file upload simulation based on a File
object.
Parameters: file - the file that will be uploaded Parameters: contentType - the content type of the file since: 1.1 |
MockFileUpload | public MockFileUpload(String fileName, InputStream inputStream, String contentType)(Code) | | Creates a new file upload simulation based on an
InputStream .
Parameters: fileName - the name of file that will be uploaded Parameters: inputStream - the input stream that will be read to provide thecontent of the uploaded file Parameters: contentType - the content type of the uploaded file since: 1.1 |
getContentType | public String getContentType()(Code) | | Returns the content type associated with this file upload simulation.
If no content type has been provided, and it could not be detected
automatically, then it defaults to text/plain .
the content type since: 1.1 |
|
|