public void endCommand() {
try {
final String line = reader.readLine();
if (line == null) {
logFailure();
throw new RemotingException("stream ended prematurely while reading end of command, aborting request");
}
if (line.length() > 0) {
logFailure();
throw new RemotingException("command didn't end with an empty blank line, aborting request");
}
} catch (final IOException e) {
logFailure();
throw new NoSqlStoreException(e);
}