StringBuffer buf = new StringBuffer();
StringBuilder buf = new StringBuilder();
  String getNonceCount(String nonce)  {    int nc = connection.getNonceCount(nonce);    String hex = Integer.toHexString(nc);    StringBuffer buf = new StringBuffer();    for (int i = 8 - hex.length(); i > 0; i--)      {        buf.append('0');      }    buf.append(hex);    return buf.toString();  }