I am using an ObjectOutputStream to send a large object (possibly a Map) to the server using my Swing application, Is there anyway to monitor the percentage sent etc as in a file upload.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could serialize your object to a byte array, like this (incomplete, credit http://www.exampledepot.com/egs/java.io/SerializeObj.html):
Then send the bytes to the server, one segment at a time. This way you’ll always know what percentage of the total has been sent. On the other side, you’ll have to reconstruct your object.