求助:java中byte[] 中数据的获取
byte version = 1;
short mstype = 3001;
short sn = 001;
String strs = "127.0.0.1";
ByteBuf buf = builderPacketHead(64, false, false, version, mstype, sn, strs);//这是封装好的方法
PS: 为什么byteBuf输出的值是 “ 74 1 -71 11 1 0 127 0 0 1”
现在我想重新从bytebuf中获取到sn和strs的值。应该怎么写?求大神