mmhttp.protocol
Class UploadedFile
java.lang.Object
mmhttp.protocol.UploadedFile
public class UploadedFile
- extends java.lang.Object
When parsing a request that contains uploaded files, the file data will be bundled up in instance of this class. The
actual file content is stored in a temporary file.
Constructor Summary |
UploadedFile(java.lang.String name,
java.lang.String type,
java.io.File file)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
UploadedFile
public UploadedFile(java.lang.String name,
java.lang.String type,
java.io.File file)
- Parameters:
name
- type
- file
-
getName
public java.lang.String getName()
- Returns:
- the file's name
getType
public java.lang.String getType()
- Returns:
- the files type
getFile
public java.io.File getFile()
- Returns:
- the File, which points to the temp file where the content is stored.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- a human readable representation of the object.
isUsable
public boolean isUsable()
- Returns:
- true if the file has a valid name.
delete
public void delete()
- Deletes the temp file containing the uploaded file content.
Copyright © 2009 Micah Martin. All Rights Reserved.