|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.multipart.UploadPart
public class UploadPart
Portion of a multi-part request representing an uploaded file.
Constructor Summary | |
---|---|
UploadPart(org.apache.commons.fileupload.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 File to 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(org.apache.commons.fileupload.FileItem fileItem)
Method Detail |
---|
public String getContentType()
IUploadFile
getContentType
in interface IUploadFile
public String getFileName()
File
to convert the full file path and extract
the name.
getFileName
in interface IUploadFile
public String getFilePath()
IUploadFile
getFilePath
in interface IUploadFile
public 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 IUploadFile
public void cleanup()
cleanup
in interface IPart
cleanup()
public void write(File file)
write
in interface IUploadFile
public long getSize()
IUploadFile
getSize
in interface IUploadFile
public boolean isInMemory()
IUploadFile
isInMemory
in interface IUploadFile
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |