outputStream.flush();
if (Thread.interrupted()) {
reset();
String localMsg = CommandException.getLocalMessage("Client.connectionAborted", null); //NOI18N
throw new CommandAbortedException("Aborted during connecting to the server.", localMsg); // NOI18N
}
// read first 11 bytes only (AUTHENTICATION_SUCCEEDED_RESPONSE\n)
// I observed lock caused by missing '\n' in reponse
// this method then blocks forever
byte rawResponse[] = inputStream.readBytes(AUTHENTICATION_SUCCEEDED_RESPONSE_RAW.length());
String response = new String(rawResponse, "utf8"); // NOI18N
if (Thread.interrupted()) {
reset();
String localMsg = CommandException.getLocalMessage("Client.connectionAborted", null); //NOI18N
throw new CommandAbortedException("Aborted during connecting to the server.", localMsg); // NOI18N
}
if (AUTHENTICATION_SUCCEEDED_RESPONSE_RAW.equals(response)) {
return;
}