private String _read() { try { String line; // read it in from the inputstream if((line = reader.readLine()).startsWith("PING ")) { _write("PONG " + line.substring(5)); return line; } else { return line; } } catch(IOException e) { System.err.println("IOException thrown [_read() : NetClient] :" + e.getMessage()); return null; } }