February 2014
Beginner
1248 pages
62h 25m
English
In Step 4, the client closes the connection when the transmission is complete by invoking the close method on the streams and on the Socket. The client must determine when the server is finished sending information so that it can call close to close the Socket connection. For example, the InputStream method read returns the value –1 when it detects end-of-stream (also called EOF—end-of-file). If an ObjectInputStream reads information from the server, an EOFException occurs when the client attempts to read a value from a stream on which end-of-stream is detected.
Read now
Unlock full access