net.sf.ooweb.http
Class FormEncodedFile
java.lang.Object
net.sf.ooweb.http.FormEncodedFile
public class FormEncodedFile
- extends java.lang.Object
Represents a file received via a multipart/form-data POST
- Author:
- Robin Rawson-Tetley
Constructor Summary |
FormEncodedFile(java.lang.String name,
java.lang.String filename,
java.lang.String mimeType,
byte[] data)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
FormEncodedFile
public FormEncodedFile(java.lang.String name,
java.lang.String filename,
java.lang.String mimeType,
byte[] data)
- Parameters:
name
- filename
- mimeType
- data
-
getName
public java.lang.String getName()
- Returns:
- the field name
getFilename
public java.lang.String getFilename()
- Returns:
- the filename used in the file upload
getMimeType
public java.lang.String getMimeType()
- Returns:
- the mime type of the file
getData
public byte[] getData()
- Returns:
- the raw data of the file as a byte[]
saveToFile
public void saveToFile(java.io.File f)
throws java.io.IOException
- Saves the file to disk
- Parameters:
f
- the File to save
- Throws:
java.io.IOException
- if the file save fails
toString
public java.lang.String toString()
- returns a simple representation of the file type
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
Copyright (C) 2005-2007 OOWeb Authors.