• 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

bufferedinputstream help

 
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to get some data using bufferedinputstream and my code is as below. The thing is it gets stuck at the read line without returning any exception. Also the filesize that got printed is 0. Does this means that the server is not returning anything or there is some other explanation? Using bufferedreader with readline also gets stuck at the read line.

The data i am suppose to get is like an xml file. thanks

 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you look at the documentation for BufferedInputStream, you will see that a call to read() will block until:


# The specified number of bytes have been read,
# The read method of the underlying stream returns -1, indicating end-of-file, or
# The available method of the underlying stream returns zero, indicating that further input requests would block.

reply
    Bookmark Topic Watch Topic
  • New Topic