private String readNfcErrorMsg(ByteBuffer reply) throws IOException {
  int errorType=reply.getInt();
  int errorCode=reply.getInt();
  int msgLen=reply.getInt();
  if (msgLen == 0) {
    return "";
  }
  ByteBuffer msgBuffer=ByteBuffer.allocate(msgLen);
  readFully(msgBuffer);
  String errorMsg=new String(msgBuffer.array(),0,msgLen - 1,Charsets.US_ASCII);
  return String.format("NFC Error %d/%d: %s",errorType,errorCode,errorMsg);
}

private String readNfcErrorMsg ( ByteBuffer reply ) throws IOException { int errorType = reply . getInt ( ) ; int errorCode = reply . getInt ( ) ; int msgLen = reply . getInt ( ) ; if ( msgLen == 0 ) { return "" ; } ByteBuffer msgBuffer = ByteBuffer . allocate ( msgLen ) ; readFully ( msgBuffer ) ; String errorMsg = new String ( msgBuffer . array ( ) , 0 , msgLen - 1 , Charsets . US_ASCII ) ; return String . format ( "NFC Error %d/%d: %s" , errorType , errorCode , errorMsg ) ; }
read nfc error from reply message .
