public static byte[] parseAsHexOrBase58(String data){
  try {
    return HEX.decode(data);
  }
 catch (  Exception e) {
    try {
      return Base58.decodeChecked(data);
    }
 catch (    AddressFormatException e1) {
      return null;
    }
  }
}

public static byte [ ] parseAsHexOrBase58 ( String data ) { try { return HEX . decode ( data ) ; } catch ( Exception e ) { try { return Base58 . decodeChecked ( data ) ; } catch ( AddressFormatException e1 ) { return null ; } } }
attempts to parse the given string as arbitrary - length hex or base58 and then return the results , or null if neither parse was successful .
