Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Progress Bar for file Upload!

 
Declan Conlon
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When data is written to a DataOutputStream constructed from a getConnection from a URLConnection, is the data written to the target(i.e. the server) instantly? Despite calling flush on my stream the VM buffers it all before sending it.
Why?
Do I need to do additional things? Is there a way around it? Note the code I have uploads the file I just can't find out how much data has been written, which I need for a file upload progress bar. Is there any way of determining the state of the upload, or is this an shortcoming of java and it is an impossible task? Help required urgently, thanks for all your contributions to the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic