public interface IFileUploadProcessor extends IProcessor
Example of writing a .csv file to a temp file
if (file.getName().endsWith(".csv")) { File tmp = File.createTempFile("upladed", ".csv"); FileOutputStream outStream = new FileOutputStream(tmp); InputStream inStream = file.openStream(); StreamCopy.drain(inStream, outStream); } return STATUS.HANDLED;
IProcessor.STATUS
Modifier and Type | Method and Description |
---|---|
IProcessor.STATUS |
processFile(ModApexContext ctx,
java.lang.String paramName,
java.lang.String id,
org.apache.commons.fileupload.FileItemStream file)
Process file.
|
IProcessor.STATUS processFile(ModApexContext ctx, java.lang.String paramName, java.lang.String id, org.apache.commons.fileupload.FileItemStream file) throws java.io.IOException
ctx
- The context which contains the http parametersparamName
- from the page ( t_01 , ... )id
- the id of the page itemfile
- the file itselfjava.io.IOException
- Signals that an I/O exception has occurred.oracle.dbtools.listener.icap.InfectedFileException
- if the stream contains infected data