This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Progress Bar for file Upload!

Declan Conlon
Ranch Hand
Posts: 34
  • 0
  • 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.
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.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic