|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.scooterframework.web.controller.UploadFile
public class UploadFile
UploadFile represents a file uploaded.
| Constructor Summary | |
|---|---|
UploadFile(org.apache.commons.fileupload.FileItem fi)
|
|
| Method Summary | |
|---|---|
byte[] |
getContent()
Returns the contents of the file item as an array of bytes. |
java.lang.String |
getContentType()
Returns the content type passed by the browser or null if not defined. |
java.lang.String |
getFieldName()
Returns the name of the field in the multipart form corresponding to this file item. |
java.lang.String |
getFieldValue()
Returns the value of the field in the multipart form corresponding to this file item. |
java.lang.String |
getFileName()
Returns the original file name. |
java.io.InputStream |
getInputStream()
Returns an InputStream that can be used to retrieve the contents of the file. |
java.io.OutputStream |
getOutputStream()
Returns an OutputStream that can be used for storing the contents of the file. |
long |
getSize()
Returns the size of the file item. |
void |
writeTo(java.io.File file)
Writes an uploaded item to disk. |
void |
writeTo(java.lang.String dirPath)
Writes an uploaded item to disk. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UploadFile(org.apache.commons.fileupload.FileItem fi)
| Method Detail |
|---|
public java.lang.String getContentType()
public java.lang.String getFieldName()
public java.lang.String getFieldValue()
public java.lang.String getFileName()
public byte[] getContent()
public long getSize()
public void writeTo(java.lang.String dirPath)
throws java.lang.Exception
dirPath - The directory into which the uploaded item should be stored.
java.lang.Exception
public void writeTo(java.io.File file)
throws java.lang.Exception
file - The File into which the uploaded item should be stored.
java.lang.Exception
public java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOException
public java.io.OutputStream getOutputStream()
throws java.io.IOException
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||