as3 ByteArray和.NET 中Byte[] 字节数组的转化
2013-04-01 14:01
435 查看
C# 代码有这么一段:
AS3 改写:
byte[] bText = System.Text.Encoding.GetEncoding("gb2312").GetBytes(txtMsgValue.Text.Trim()); string bbText = BitConverter.ToString(bText).Replace("-", "");
AS3 改写:
var bytes:ByteArray =new ByteArray(); bytes.writeMultiByte(txtMsgValue.text,"gb2312"); bytes.position=0; var bbText:String =""; while(bytes.bytesAvailable) { bbText+=bytes.readUnsignedByte().toString(16); } bbText=bbText.replace(/-/g,"");//
相关文章推荐
- Flex与.NET互操作(十五):使用FluorineFx中的字节数组(ByteArray)实现图片上传
- Flex与.NET互操作(十五):使用FluorineFx中的字节数组(ByteArray)实现图片上传
- Flex与.NET互操作(十五):使用FluorineFx中的字节数组(ByteArray)实现图片上传
- Flex与.NET互操作(十五):使用FluorineFx中的字节数组(ByteArray)实现图片上传 推荐
- PYTHON 3.1 快速导览 – 内建字节数组型态 (BYTEARRAY)
- 『0014』 - Solidity Types - 动态大小字节数组(Dynamically-sized byte array)
- delphi中如何将string类型的字符串数据转化成byte[]字节数组类型的数据
- 将Byte数组转化为String-.NET教程,C#语言
- Java IO深入理解字节和字符数组(ByteArrayInputStream、ByteArrayOutputStream、CharArrayReader、CharArrayWriter)
- 15.1 ByteArrayInputStream(字节数组输入流)和ByteArrayOutputStream类(字节数组输出流)
- as3加密DES过程中,1、字符串转成ByteArray(byte数组)形式 ,2、ByteArray编码成base64 3、把ByteArray转换为16进制的形式的字符串
- 关于ByteArrayOutputStream(字节数组输出流)的一个例子,与ByteArrayInputStream作一比较
- 字节数组byte[]与16进制字符串的相互转化
- Byte Array to NSData——iOS将服务器返回的图片字节数组用UIImageView显示该图像
- php字符串与byte字节数组转化类示例
- 关于ByteArrayOutputStream(字节数组输出流)的一个例子,与ByteArrayInputStream作一比较
- 字节数组与整数的相互转化
- C#--整型与字节数组byte[]之间的转换
- NSdata如何转化NSdata 与 NSString,Byte数组
- 十六进制字符串(CString或char[]) 和 BYTE,char数组 相互转化