• 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
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

BufferedOutputStream

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using a Server and a client program to communicate using sockets.Whenever I write data to a BufferedOutputStream in the server it never appears at the client .Flushing the bufferedoutputStream dosen't work.
I get data at the client only if i use a big loop to continuosly write to the bufferedoutputstream.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry dear, i am not able to ans. ur question. but ur display name is not according to naming policy of javaranch. so visit the foolowing link
naming policy
and also u r no allowed to post multiple thread of same ques. so pls. correct ur display name. well u will get a mail from moderaters of this forum also.
 
author and iconoclast
Posts: 24203
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sanjeev,
Note that your display name is a violation of the naming policy as well! You need both first and last names, with a space between.
Otherwise, thanks for pitching in! See you around the Ranch!
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to the IO and Streams forum...
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using PrintWriter instead on BufferedOutputStream and the println method instead of write works very well but the autoflush option must be enabled while creating a PrintWriter Object.
Also using print (instead of println) dosen't work because println inserts a line separator string ( "/n" : system dependant) at the end of user entered string which is required for autoflushing
 
reply
    Bookmark Topic Watch Topic
  • New Topic