|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.struts2.rest.handler.MultipartFormDataHandler
public class MultipartFormDataHandler
Handles the default content type for requests that originate from a browser's HTML form
with a file upload and multipart/from-data encoding
content-type: multipart/form-data
This handler is intended for requests only, not for responses
http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4
| Field Summary | |
|---|---|
static String |
CONTENT_TYPE
|
| Constructor Summary | |
|---|---|
MultipartFormDataHandler()
|
|
| Method Summary | |
|---|---|
String |
fromObject(Object obj,
String resultCode,
Writer out)
Writes content to the stream |
String |
getContentType()
Gets the content type for this handler |
String |
getExtension()
The extension is not used by this handler |
void |
toObject(Reader in,
Object target)
No transformation is required as the framework handles this data |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONTENT_TYPE
| Constructor Detail |
|---|
public MultipartFormDataHandler()
| Method Detail |
|---|
public String fromObject(Object obj,
String resultCode,
Writer out)
throws IOException
ContentTypeHandler
fromObject in interface ContentTypeHandlerobj - The object to write to the stream, usually the Action classresultCode - The original result codeout - The output stream, usually the response
IOException - If unable to write to the output stream
public void toObject(Reader in,
Object target)
toObject in interface ContentTypeHandlerin - The input stream, usually the body of the requesttarget - The target, usually the action classpublic String getExtension()
getExtension in interface ContentTypeHandlerpublic String getContentType()
ContentTypeHandler
getContentType in interface ContentTypeHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||