*/
package mir.session;
+import java.io.File;
import java.io.InputStream;
public interface UploadedFile {
- InputStream getInputStream() throws SessionExc, SessionFailure;
- String getFileName();
- String getFieldName();
- String getContentType();
+ /**
+ * Writes the uploaded content to a file
+ */
+ public void writeToFile(File aFile) throws SessionExc, SessionFailure;
+
+ /**
+ * Creates an <code>InputStream</code> to access the uploaded content
+ */
+ public InputStream getInputStream() throws SessionExc, SessionFailure;
+
+ /**
+ * Return the filename supplied by the uploader if available.
+ * <code>null</code> if no filename is available.
+ */
+ public String getFileName();
+
+ /**
+ * Return the field name associated with the uploaded file
+ */
+ public String getFieldName();
+
+ /**
+ * Return the content type (if it's present) of the uploaded file.
+ * <code>null</code> if no content type is available.
+ */
+ public String getContentType();
}
\ No newline at end of file