Decode Unicode Hex : Hex « Date Type « Android

Home
Android
1.2D Graphics
2.Animation
3.Core Class
4.Database
5.Date Type
6.Development
7.File
8.Game
9.Hardware
10.Media
11.Network
12.Security
13.UI
14.User Event
Android » Date Type » Hex 
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((intChar[i]);

      if (strHex.length() == 1)
        strHex = "0" + strHex;

      if (strHex.equals("00"&& CouldContinue)
        continue;
      else {
        strTemp += strHex;
        CouldContinue = false;
      }
    }

    return strTemp;
  }
}

   
  
Related examples in the same category
1.Hex Dump
2.converts given byte array to a hex string
3.converts given hex string to a byte array (ex: "0D0A" => {0x0D, 0x0A,})
4.Color name and its hex value
5.hex To Decimal
6.Get Hex string out of byte array
7.get Brightness, get Hex Name
8.String to Hex
9.Convenience method to convert a byte to a hex string.
10.Convenience method to convert a byte array to a hex string.
11.Convert a byte[] array to readable string format. This makes the "hex" readable!
12.byte Array To Hex String
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.