/**
  * Perform a read into buffer.
  *
  * @return true if the read succeeded, false if there was an error or the connection closed.
  */
 private boolean internalRead() {
   try {
     if (trans_.read(buffer_) < 0) {
       return false;
     }
     return true;
   } catch (IOException e) {
     Log.w("Thrift", "Got an IOException in internalRead!", e);
     return false;
   }
 }