|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.uwyn.rife.test.MockFileUpload
public class MockFileUpload
An instance of this class provides all the data that is needed to simulate a file upload.
| Constructor Summary | |
|---|---|
MockFileUpload(File file)
Creates a new file upload simulation based on a File
object. |
|
MockFileUpload(File file,
String contentType)
Creates a new file upload simulation based on a File
object. |
|
MockFileUpload(String fileName,
InputStream inputStream,
String contentType)
Creates a new file upload simulation based on an InputStream. |
|
| Method Summary | |
|---|---|
String |
getContentType()
Returns the content type associated with this file upload simulation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockFileUpload(File file)
File
object.
The content type will be guessed from the file extension. The
extension to mime-type mapping is retrieved from RifeConfig.Mime.
file - the file that will be uploaded
public MockFileUpload(File file,
String contentType)
File
object.
file - the file that will be uploadedcontentType - the content type of the file
public MockFileUpload(String fileName,
InputStream inputStream,
String contentType)
InputStream.
fileName - the name of file that will be uploadedinputStream - the input stream that will be read to provide the
content of the uploaded filecontentType - the content type of the uploaded file| Method Detail |
|---|
public String getContentType()
If no content type has been provided, and it could not be detected
automatically, then it defaults to text/plain.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||