|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.extend.FormField
public class FormField
The result of a DWR query is normally a set of name/value pairs unless we are doing file-upload in which case there is more information with each field. This class replaces the value part of the set of name/value pairs to provide access to the extra information.
| Constructor Summary | |
|---|---|
FormField(java.lang.String string)
Standard ctor for the normal non file-upload case |
|
FormField(java.lang.String name,
java.lang.String mimeType,
long fileSize,
InputStreamFactory inFactory)
Ctor for when we are in the special file-upload case |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
long |
getFileSize()
Returns the size of the file. |
java.io.InputStream |
getInputStream()
Returns an InputStream that can be used to retrieve the contents of the file. |
java.lang.String |
getMimeType()
Returns the content type passed by the browser or null if not defined. |
java.lang.String |
getName()
Returns the original filename in the client's file-system, as provided by the browser (or other client software). |
java.lang.String |
getString()
Returns the contents of the file item as a String. |
int |
hashCode()
|
boolean |
isFile()
Determines whether or not a FormField instance represents a simple form field. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FormField(java.lang.String string)
string - The string value
public FormField(java.lang.String name,
java.lang.String mimeType,
long fileSize,
InputStreamFactory inFactory)
name - The file namemimeType - The mime type sent by the browserfileSize - The size of the file sent by the browserinFactory - FActory for the input stream sent by the browser| Method Detail |
|---|
public java.lang.String getMimeType()
public long getFileSize()
public java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getName()
public java.lang.String getString()
public boolean isFile()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||