|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UploadedFile
Method Summary | |
---|---|
void |
dispose()
Dispose of the resources associated with the file upload (this will happen automatically when the resource is garbage collected). |
java.lang.String |
getAsString()
Use this method to retrieve the contents of the file as a String |
byte[] |
getBytes()
Use this method to retrieve the contents of the file as an array of bytes. |
java.lang.String |
getClientFilePath()
Return the literal value of the upload input element, else null. |
java.lang.String |
getContentType()
Get the content-type that the browser communicated with the request that included the uploaded file. |
java.io.InputStream |
getInputStream()
Returns a InputStream for reading the file. |
java.lang.String |
getOriginalName()
Use this method to retrieve the value that was submitted as the value of the upload input element. |
long |
getSize()
The size of the file in bytes |
void |
write(java.io.File file)
Write the contents of the uploaded file to a file on the server host. |
Method Detail |
---|
java.io.InputStream getInputStream() throws java.io.IOException
InputStream
for reading the file.
InputStream
for reading the file.
java.io.IOException
- if there is a problem while reading the filejava.lang.String getContentType()
java.lang.String getOriginalName()
java.lang.String getClientFilePath()
Upload.isPreservePath()
long getSize()
byte[] getBytes()
java.lang.String getAsString()
void write(java.io.File file) throws java.lang.Exception
file
- The File
where the contents should be written
java.lang.Exception
- thevoid dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |