Skip to content
Advertisement

Tag: eof

InputStream never gets EOF

Before anything, allow me to show you my client code: once connected to the actual socket, the client sends out some authentication data, but doesn’t recieve any data, now, it waits to recieve data from the server, and when it does, it processes it fine etc, except, when I stop the server (literally shutting down the program), nothing happens, when

How to detect EOF in Java?

I’ve tried some ways to detect EOF in my code, but it still not working. I’ve tried using BufferedReader, Scanner, and using char u001a to flag the EOF, but still not make any sense to my code. Here is my last code : The program supposed to stopped when it’s already reached the EOF, but I don’t know why, for

Advertisement