WAP PUSH后台源码,WAP PUSH后台源码

源代码在线查看: font.java

软件大小: 3167 K
上传用户: LotusAwhaT
关键词: PUSH WAP 后台 源码
下载地址: 免注册下载 普通下载 VIP

相关代码

				package com.sxit.wap.common;
				
				public class Font {
				  public Font() {
				  }
				  public static String getJavaUTFString(String gbString) {
				   if (gbString == null) {
				     return "";
				   }
				   char[] utfBytes = gbString.toCharArray();
				   String unicodeBytes = "";
				
				   for (int byteIndex = 0; byteIndex < utfBytes.length; byteIndex++) {
				     String hexB = "";
				     if (utfBytes[byteIndex] > '!') {
				       hexB = Integer.toHexString(utfBytes[byteIndex]);
				       if (hexB.length() 				         hexB = "00" + hexB;
				       }
				       unicodeBytes = unicodeBytes + "&#x" + hexB + ";";
				
				     }
				     else {
				       unicodeBytes += utfBytes[byteIndex];
				     }
				   }
				   return unicodeBytes;
				 }
				 public static void main(String[] args){
				System.out.println(Font.getJavaUTFString("你好"));
				 }
				}
							

相关资源