|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.acciente.commons.htmlform.FileHandle
public class FileHandle
This class is a facade to isolate the fileupload implementation from the multi-part parser used.
Constructor Summary | |
---|---|
FileHandle(org.apache.commons.fileupload.FileItem oFileItem)
|
Method Summary | |
---|---|
String |
getContentType()
Returns the content type set by the browser that uploded the file, if not content type was set null |
InputStream |
getInputStream()
Returns an input stream that may used to read the contents of the uploaded file |
String |
getOriginFilename()
Returns the original name of the uploaded file on the system from which it originated |
long |
getSize()
Returns the size of the file in bytes |
void |
write(File oToFile)
Write out the contents of the uploaded file to the specified destination |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileHandle(org.apache.commons.fileupload.FileItem oFileItem)
Method Detail |
---|
public String getContentType()
null is returned
- Returns:
- the mime type of the content
public long getSize()
public String getOriginFilename()
public void write(File oToFile) throws Exception
oToFile
- the file to write to
Exception
- if an error occurspublic InputStream getInputStream() throws IOException
IOException
- if an error occurs
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |