|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry.multipart.UploadPart
public class UploadPart
Portion of a multi-part request representing an uploaded file.
| Constructor Summary | |
|---|---|
UploadPart(FileItem fileItem)
|
|
| Method Summary | |
|---|---|
void |
cleanup()
Deletes the external content file, if one exists. |
String |
getContentType()
Returns the MIME type specified when the file was uploaded. |
String |
getFileName()
Leverages Fileto convert the full file path and extract the
name. |
String |
getFilePath()
Returns the complete path, as reported by the client browser. |
long |
getSize()
Returns the size, in bytes, of the uploaded content. |
InputStream |
getStream()
Returns an input stream of the content of the file. |
boolean |
isInMemory()
Returns true if the uploaded content is in memory. |
void |
write(File file)
Writes the uploaded content to a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UploadPart(FileItem fileItem)
| Method Detail |
|---|
public String getContentType()
IUploadFile
getContentType in interface IUploadFilepublic String getFileName()
Fileto convert the full file path and extract the
name.
getFileName in interface IUploadFilepublic String getFilePath()
IUploadFile
getFilePath in interface IUploadFilepublic InputStream getStream()
IUploadFile
As of release 1.0.8, this will be a a
ByteArrayInputStream, but that, too, may change (a
future implementation may upload the stream to a temporary file and
return an input stream from that).
getStream in interface IUploadFilepublic void cleanup()
public void write(File file)
write in interface IUploadFilepublic long getSize()
IUploadFile
getSize in interface IUploadFilepublic boolean isInMemory()
IUploadFile
isInMemory in interface IUploadFile
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||