public static String utf8Byte2String
来源:互联网 发布:js 获取元素父节点 编辑:程序博客网 时间:2024/04/18 22:00
public static String utf8Byte2String(byte[] utf8byte, int fromIndex,
int size) {
String s = "";
ByteArrayInputStream strmBytes = null;
DataInputStream strmDataType = null;
;
try {
byte data[] = new byte[size + 2];
data[0] = (byte) (size >> 8);
data[1] = (byte) (size);
System.arraycopy(utf8byte, fromIndex, data, 2, size);
strmBytes = new ByteArrayInputStream(data);
strmDataType = new DataInputStream(strmBytes);
s = strmDataType.readUTF();
} catch (IOException e) {
} catch (Exception e) {
} finally {
if (strmDataType != null) {
try {
strmDataType.close();
} catch (IOException e) {
}
}
if (strmBytes != null) {
try {
strmBytes.close();
} catch (IOException e) {
}
}
}
return s;
}
- public static String utf8Byte2String
- public static void main(String[] args) 分析
- public static void main(String [] args)
- public Static void main(String[]args){
- public static String toHexStr(byte[] key) {
- public static byte[] hexToBytes(String hexStr) {
- public static String byte2Unicode(byte by[]) {
- public static byte[] Unicode2Byte(String s) {
- public static byte[] convertUnicode2UTF8Byte(String instr) {
- public static byte[] stringArray2byteArray(String[] strs) {
- public static String[] byteArray2StringArray(byte[] raw) {
- public static String getProcessName(Context context) {
- public static File createNewFile(String filePath)
- public static void main(String[] args)
- 浅谈 public static void main(String[] args)
- 关于public static void main(String[] args)
- public static void main(String[] args){…}
- public static void main(String[] arg)
- Star Dictionary (S60 5th) v0.1
- WinForm 窗口出现在靠屏幕左边中间或者右边中间
- 玩转AndroidHandler组件
- Android的应用程序框架入门
- java call oracle procudure setBoolean问题PLS-00306: wrong number or types of arguments in call to
- public static String utf8Byte2String
- 推荐几本书
- ShellExecute与ShellExecuteEx的用法
- WinFrom中实现点击关闭按钮窗口在靠屏幕左边中间缓缓收缩
- WIN32 Socket API
- hdu1233最小生成树
- public static void longToAscString
- 计算机视觉及多媒体相关conference&journal评级
- android访问远程数据库