美文网首页
android byte[]怎么通过handler传输

android byte[]怎么通过handler传输

作者: 是我拉叔 | 来源:发表于2020-01-17 20:09 被阅读0次

byte[] bs = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};

Bundle bundle =new Bundle();

bundle.putByteArray("bytes", bs);

Message msg =new Message();

msg.what =0;

msg.obj = bundle;

Bundle b = (Bundle)msg.obj;

byte[] c = bundle.getByteArray("bytes");

System.out.println("c[]: " + Arrays.toString(c));

System.out.println("c[]: " + Arrays.toString(c));

相关文章

网友评论

      本文标题:android byte[]怎么通过handler传输

      本文链接:https://www.haomeiwen.com/subject/knrhzctx.html