public class FakeFileItem extends Object implements org.wisdom.api.http.FileItem
| Modifier and Type | Field and Description |
|---|---|
private String |
field
The field of the form having sent the file.
|
private File |
file
The file.
|
| Constructor and Description |
|---|
FakeFileItem(File file,
String field)
Creates a new fake file item.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
bytes() |
String |
field() |
boolean |
isInMemory()
This method is not usable from tests.
|
String |
mimetype()
Tries to guess the mime-type of the file by analyzing its extension.
|
String |
name() |
long |
size() |
InputStream |
stream() |
private final File file
private final String field
public String field()
field in interface org.wisdom.api.http.FileItempublic String name()
name in interface org.wisdom.api.http.FileItempublic byte[] bytes()
bytes in interface org.wisdom.api.http.FileItempublic InputStream stream()
stream in interface org.wisdom.api.http.FileItempublic boolean isInMemory()
isInMemory in interface org.wisdom.api.http.FileItempublic String mimetype()
mimetype in interface org.wisdom.api.http.FileItempublic long size()
size in interface org.wisdom.api.http.FileItemCopyright © 2013–2014 Wisdom Framework. All rights reserved.