How to create ZIP files using list of Input streams?
In my case i have to download images from resources folder in my web
app.right now i am using the following code to download images throgh 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 a single operation to read all images at once and create a zip
file for this. i don't know so much about use of sequence input streams
and zip inputstreams so if it possible through these.please let me know.
No comments:
Post a Comment