private void readRoot() throws IOException {
  if (root != null) {
    return;
  }
  ByteArrayOutputStream content=new ByteArrayOutputStream();
  byte[] buffer=new byte[READ_BUFFER_SIZE];
  try {
    while (trans_.read(buffer,0,READ_BUFFER_SIZE) > 0) {
      content.write(buffer);
    }
  }
 catch (  TTransportException e) {
    if (TTransportException.END_OF_FILE != e.getType()) {
      throw new IOException(e);
    }
  }
  root=OBJECT_MAPPER.readTree(content.toByteArray());
}

private void readRoot ( ) throws IOException { if ( root != null ) { return ; } ByteArrayOutputStream content = new ByteArrayOutputStream ( ) ; byte [ ] buffer = new byte [ READ_BUFFER_SIZE ] ; try { while ( trans_ . read ( buffer , 0 , READ_BUFFER_SIZE ) > 0 ) { content . write ( buffer ) ; } } catch ( TTransportException e ) { if ( TTransportException . END_OF_FILE != e . getType ( ) ) { throw new IOException ( e ) ; } } root = OBJECT_MAPPER . readTree ( content . toByteArray ( ) ) ; }
read in the root node if it has not yet been read .
