• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Progress Bar for file Upload!

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic