Hi,
hope you had a relaxing vacation. I'm still facing the problems described
two weeks ago and would be very grateful for some additional hints. Here's
an extract of the client code:
int size = Integer.valueOf(method.getResponseHeader("size").getValue());
progressHandle.start(100); // start progress bar of Netbeans Platform
int readBytes = 0;
ObjectInputStream in = new ObjectInputStream(new
ZIPInputStream(method.getResponseBodyAsStream()));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
int curByte = -1;
while((curByte=in.read())>=0){
baos.write(curByte);
readBytes++;
int per = (int) 100.0 * readBytes/size;
progressHandle.progress(per); // update status bar
}
ObjectInputStream ois = new ObjectInputStream(new
ByteArrayInputStream(baos.toByteArray()));
Object o = ois.readObject();
ois.close();
progressHandle.finish();
Many Thanks
Marcel
--
View this message in context:
http://www.nabble.com/visualizing-upload-download-status-in-a-statusbar-tp19685137p19900396.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]