|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.servlet.MultipartFormField
public class MultipartFormField
Holds information parsed from a multipart/form-data file upload. Based on RFC 1867 which describes the format for uploading files in multipart/form-data. Tested on IE 5.0, HotJava 3.0, Netscape Navigator 4.x
Field Summary | |
---|---|
static long |
GIGABYTE
Number of bytes in a gigabyte. |
static long |
KILOBYTE
Number of bytes in a kilobyte. |
static long |
MEGABYTE
Number of bytes in a megabyte. |
Constructor Summary | |
---|---|
MultipartFormField()
Constructor. |
Method Summary | |
---|---|
String |
getContentDisposition()
Get the ContentDisposition . |
String |
getContentType()
Get the ContentType . |
byte[] |
getData()
|
File |
getDataFile()
Return the data saved as a file (or null if it is not saved). |
long |
getDataSize()
Return the length of the data. |
String |
getDataString()
|
String |
getDataString(String enc)
Get the data using the specified encoding. |
String |
getDataURL()
Return a URL to the saved data (or null if no such URL exists). |
String |
getFieldName()
Get the FieldName . |
FormDataAdaptor |
getFormDataAdaptor()
|
String |
getPrettyDataSize()
The size of the file as a formatted string. |
String |
getUploadedFileName()
Get the UploadedFileName . |
String |
getUploadedFilePath()
Get the UploadedFilePath . |
void |
setContentDisposition(String contentDisposition)
Set the ContentDisposition . |
void |
setContentType(String contentType)
Set the ContentType . |
void |
setFieldName(String fieldName)
Set the FieldName . |
void |
setFormDataAdaptor(FormDataAdaptor adaptor)
Work with an uploaded file/stored value. |
void |
setUploadedFilePath(String filePath)
Set the UploadedFilePath . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long KILOBYTE
public static final long MEGABYTE
public static final long GIGABYTE
Constructor Detail |
---|
public MultipartFormField()
Method Detail |
---|
public void setContentType(String contentType)
ContentType
.
contentType
- the Content Type to set it topublic String getContentType()
ContentType
.
ContentType
public void setContentDisposition(String contentDisposition)
ContentDisposition
.
contentDisposition
- the Content Disposition to set it topublic String getContentDisposition()
ContentDisposition
.
ContentDisposition
public void setFieldName(String fieldName)
FieldName
.
fieldName
- the name to set fieldName
topublic String getFieldName()
FieldName
.
FieldName
public void setUploadedFilePath(String filePath)
UploadedFilePath
.
filePath
- the name to set filePath
topublic String getUploadedFilePath()
UploadedFilePath
.
UploadedFilePath
public String getUploadedFileName()
UploadedFileName
.
UploadedFileName
public FormDataAdaptor getFormDataAdaptor()
public void setFormDataAdaptor(FormDataAdaptor adaptor)
adaptor
- a FormDataAdaptor
to set adaptor
topublic byte[] getData()
public String getDataString()
public String getDataString(String enc)
enc
- an encoding which may be null or empty
public long getDataSize()
public File getDataFile()
public String getDataURL()
public String getPrettyDataSize()
String
.public String toString()
toString
in class Object
Object.toString()
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |