I think having two BufferedInputStreams in parallel was confusing the system. Which one would be keeping track of what bytes had been read? Having only one removes the confusion.
Maybe the...
Type: Posts; User: Norm
I think having two BufferedInputStreams in parallel was confusing the system. Which one would be keeping track of what bytes had been read? Having only one removes the confusion.
Maybe the...
Try changing the code so it reads from the same class object. The posted code gets a new class objects every time it does a read.
What is that about?
Is the trace is for AllInOne when there is no problem? It looks like there is a wait between the call to nextInt() and when the data is written, since there is no EOF...
I editted my last post.
What does the trace/debug output look like for AllInOne?
What does the trace/debug output show? What order do the events occur in?
Why does the AllInOne program work?
The 140 = 68+72.
Is the available=0 from the same object as the 140?
Read the API doc for the classes and find the methods that give that data.
Have you traced the bytes written counts and the bytes available to be read?
Everywhere that something happens.
The values of all the variables needs to be displayed.
Not enough debug output to see what is happening.
Here's what I am getting:
What could be different about the AllInOne version that it doesn't have the problem?
Can you post the full trace/debug output for when the program gets the error?
Interesting that the AllInOne version works. Have you tried it with more than one client?
My IDE is very simple and does not support "projects". That's why I had you put the classes in a single...
Please explain what happens.
What files does the program need to execute? I see reference to some .png files.
You may have to make the inner classes static for it to compile.
I see some of the code does not have import statements.
Can you put the code into a single java file that can be compiled and executed to show the problem?
Make a driver class with a main method...
If you want help with your code you will need to post a small complete program that compiles, executes and shows the problem.
This looks like code that will loop forever:
while(true);
Why is...
Can you change your logic so it does not try writing to a closed socket?