转换byte(十进制)为图形(大小写字母,符号)
2019-10-08 09:21:25来源:博客园 阅读 ()
转换byte(十进制)为图形(大小写字母,符号)
/**
* 转换byte(十进制)为字母
*/
public static String ByteToLetter (byte[] chars) {
String Letter = "";
for (int i = 0; i < chars.length; i++) {
switch (chars[i]) {
case 45:
Letter += "-";
break;
case 46:
Letter += ".";
break;
case 47:
Letter += "/";
break;
case 48:
Letter += "0";
break;
case 49:
Letter += "1";
break;
case 50:
Letter += "2";
break;
case 51:
Letter += "3";
break;
case 52:
Letter += "4";
break;
case 53:
Letter += "5";
break;
case 54:
Letter += "6";
break;
case 55:
Letter += "7";
break;
case 56:
Letter += "8";
break;
case 57:
Letter += "9";
break;
case 65:
Letter += "A";
break;
case 66:
Letter += "B";
break;
case 67:
Letter += "C";
break;
case 68:
Letter += "D";
break;
case 69:
Letter += "E";
break;
case 70:
Letter += "F";
break;
case 71:
Letter += "G";
break;
case 72:
Letter += "H";
break;
case 73:
Letter += "I";
break;
case 74:
Letter += "J";
break;
case 75:
Letter += "K";
break;
case 76:
Letter += "L";
break;
case 77:
Letter += "M";
break;
case 78:
Letter += "N";
break;
case 79:
Letter += "O";
break;
case 80:
Letter += "P";
break;
case 81:
Letter += "Q";
break;
case 82:
Letter += "R";
break;
case 83:
Letter += "S";
break;
case 84:
Letter += "T";
break;
case 85:
Letter += "U";
break;
case 86:
Letter += "V";
break;
case 87:
Letter += "W";
break;
case 88:
Letter += "X";
break;
case 89:
Letter += "Y";
break;
case 90:
Letter += "Z";
break;
case 95:
Letter += "a";
break;
case 98:
Letter += "b";
break;
case 99:
Letter += "c";
break;
case 100:
Letter += "d";
break;
case 101:
Letter += "e";
break;
case 102:
Letter += "f";
break;
case 103:
Letter += "g";
break;
case 104:
Letter += "h";
break;
case 105:
Letter += "i";
break;
case 106:
Letter += "j";
break;
case 107:
Letter += "k";
break;
case 108:
Letter += "l";
break;
case 109:
Letter += "m";
break;
case 110:
Letter += "n";
break;
case 111:
Letter += "o";
break;
case 112:
Letter += "p";
break;
case 113:
Letter += "q";
break;
case 114:
Letter += "r";
break;
case 115:
Letter += "s";
break;
case 116:
Letter += "t";
break;
case 117:
Letter += "u";
break;
case 118:
Letter += "v";
break;
case 119:
Letter += "w";
break;
case 120:
Letter += "x";
break;
case 121:
Letter += "y";
break;
case 122:
Letter += "z";
break;
default:
Letter += "";
}
}
return Letter;
}
原文链接:https://www.cnblogs.com/zhch1212/p/11629776.html
如有疑问请与原作者联系
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- Kotlin与java8的SAM转换对比 2020-06-03
- Java String和Date的转换 2020-05-19
- LeetCode 8. 字符串转换整数 (atoi) 2020-05-14
- 【JAVA SE基础篇】10.运算符优先级与类型转换 2020-05-09
- 八种基本类型 2020-05-08
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash