Hi Team, I'm using jdev 12.2.1.4.0. I have a requirement to download two files ( one pdf and excel file) using file download listener.
Previously I can able to download a single file(pdf) using like below.Now i have to download one more excel file from the path. Is it possible to zip these files and download in one click. please suggest me
String docname ="";
docname="test.pdf";
String fileUploadLoc = (String) op.execute();(will get the path of the file from lookups)
File f = new File(fileUploadLoc + docname);
try {
InputStream in = new FileInputStream(f);
byte[] buf = new byte[1024];
int count;
while ((count = in.read(buf)) >= 0) {
outputStream.write(buf, 0, count);
}
} catch (IOException e) {
//prints exception message and detail of the exception
e.printStackTrace();
logger.error(e.getMessage(), e);
}