In my case, I need to load images from the resource folder in my web application. I am now using the following code to upload images via a URL.
url = new URL(properties.getOesServerURL() + "//resources//WebFiles//images//" + imgPath); filename = url.getFile(); is = url.openStream(); os = new FileOutputStream(sClientPhysicalPath + "//resources//WebFiles//images//" + imgPath); b = new byte[2048]; while ((length = is.read(b)) != -1) { os.write(b, 0, length); }
But I want one operation to read all the images at once and create a zip file for this. I donโt know much about using sequence input streams and zip input streams, so if possible, let me know.
source share