// 接收byte响应
public static RecevEntity getRetVo(byte[] data)
{
ByteBuffer buf = ByteBuffer.wrap(data);
buf.order(ConstantSelf.AgentMsgByteSet);
SelfQryRspVO uvo = new SelfQryRspVO();
{
byte[] cisdn = new byte[21];
buf.get(cisdn);
uvo.setIsdn(new String(cisdn, ConstantSelf.AgentMsgEncoding).toString().trim());
uvo.setDwseq(buf.getInt());
uvo.setBuflen(buf.getInt());
uvo.setResult(buf.getInt());
}
}
// 打包发送byte数据
public static byte[] getBytes(int msgFlag, int type,String fileName)
{
// 发送的消息总长度
int msgtotallen = 4 +
1 +
256;
ByteBuffer buf = ByteBuffer.allocate(msgtotallen);
// 设置字节序
buf.order(ByteOrder.LITTLE_ENDIAN);
try
{