public static void expectOk ( String response ) throws ProtocolException { if ( ! "OK" . equalsIgnoreCase ( response ) ) { throw new ProtocolException ( response , Direction . RECEIVE ) ; } }
Check the response for an OK message . Throw an exception if response is not expected .