Mega Code Archive

 
Categories / Android / Date Type
 

Decode Unicode Hex

/*  * Copyright (C) 2011 The LiteListen Project  *   * Licensed under the Mozilla Public Licence, version 1.1 (the "License");  * You may not use this file except in compliance with the License.  * You may obtain a copy of the License at  *  *      http://www.mozilla.org/MPL/MPL-1.1.html  *   * ???? Mozilla Public Licence 1.1 ???????³?????????  *  *      http://www.mozilla.org/MPL/MPL-1.1.html  */ class Main {   public static String DecodeUnicodeHex(char[] Char) {     String strTemp = "";     boolean CouldContinue = true;     for (int i = Char.length - 1; i >= 0; i--) {       String strHex = Integer.toHexString((int) Char[i]);       if (strHex.length() == 1)         strHex = "0" + strHex;       if (strHex.equals("00") && CouldContinue)         continue;       else {         strTemp += strHex;         CouldContinue = false;       }     }     return strTemp;   } }