aspose file tools*
The moose likes I/O and Streams and the fly likes PrintStream problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "PrintStream problems" Watch "PrintStream problems" New topic
Author

PrintStream problems

Alistair Macdonald
Greenhorn

Joined: Aug 18, 2008
Posts: 1
Hi,

I'm having problems with PrintStreams. I've created a program which reads and writes data on a socket, using BufferedReader and PrintStreams. If there is data going both ways it works okay. If there is data to send but none to receive i keep getting intermittent errors when i try writing to the socket. Below is a test program that i've knocked together.


The system.out.println statement at the error here label returns true but as far as i can see there is nothing wrong with the socket connection or the printstream. Has anybody come across a similar problem before?

Cheers

Al

JCE: Please use Code Tags
[ August 18, 2008: Message edited by: Joe Ess ]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Welcome to the JavaRanch.
Have a look at our FAQ: How to ask Questions. For example, few of us have time to read 250 lines of code, so you need to Isolate The Problem. You also need to Tell the Details. If you are getting an exception, we need to know what it is. Post the stack trace as it contains valuable information as to the location and circumstances of the exception.
The better question you ask, the more help we can be.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PrintStream problems