A simple server
listen = getServer();
Logger.getAnonymousLogger().info(\"Listening to \"+listen.toString());
SSLSocket client = (SSLSocket)listen.accept();
/
The situation is invalid. You are trying to read data that isn't sent. This is an application protocol error. All the statements in Bruno's answer apply as well. The client is trying to do a handshake; the server is trying to close the connection. Arguably the server close could initiate a handshake if it hasn't been done already, but it doesn't.
As you've noted, another workaround would be to call startHandshake() at either end.