4月4日,Decode,每日20行。
来源:互联网 发布:windows连不上无线网 编辑:程序博客网 时间:2024/05/29 04:27
import java.io.*;public class Decode { public static void printByteArray(String msg, byte[] t){ System.out.println(msg + "****************"); for(int i = 0; i < t.length; i++){ System.out.println(Integer.toHexString(t[i])); } } public static void printCharArray(String msg, char[] c){ System.out.println(msg + "****************"); for(int i = 0; i < c.length; i++){ System.out.println(Integer.toHexString(c[i])); } } public static void main(String[] args) { byte[] b = new byte[6]; int t = 0, pos = 0; String s; try{ while(t != '\n'){ t = System.in.read(); //输入内容按字节读入存放 b[pos] = (byte)t; pos++; } printByteArray("本地码:", b); s = new String(b, "GBK"); //按照 GBK 方式进行解码 System.out.println(s); printCharArray("unicode码:", s.toCharArray()); } catch(Exception e){ System.out.println(e.getMessage()); } }}
0 0
- 4月4日,Decode,每日20行。
- 6月4日,每日20行。
- 每日随笔小记-4月20日
- 4月20日,TestVector,每日20行。
- 3月4日,simple_window,每日20行。
- 4月1日,StringEqualTest,每日20行。
- 4月2日,StringEqualTest1,每日20行。
- 4月3日,CharCode,每日20行。
- 4月5日,StringBufferPass,每日20行。
- 4月6日,StringBufferModify,每日20行。
- 4月7日,RemoveHZ,每日20行。
- 4月8日,DemogetProperties,每日20行。
- 4月9日,GetCurrentTime,每日20行。
- 4月10日,MyThread,每日20行。
- 4月11日,MyThread,每日20行。
- 4月12日,TestMyThread,每日20行。
- 4月13日,TestThread,每日20行。
- 4月14日,TestJoin,每日20行。
- Python编码规范(PEP8)及奇技淫巧(不断更新)
- Java微信公众平台开发之接入
- AndroidAnnotations开发框架在Eclipse中的搭建和使用以及框架实
- 机器学习笔记3——牛顿方法
- 1.13接口卡
- 4月4日,Decode,每日20行。
- B/S(Web)实时通讯解决方案
- there is no staged files
- 1457: 棋盘游戏
- Android 最火的快速开发框架AndroidAnnotations使用详解
- 前端大牛得到的最佳职业生涯建议
- 网络层--地址解析协议ARP
- 1.14各类存储器芯片
- MySQL的3种应用方式和3种数据库用途