Пример #1
0
 protected void makeBody() {
   byte b[] = new byte[0];
   if (sMsg != null || sMsg.length() > 0) b = sMsg.getBytes();
   super.body = new byte[17 + b.length];
   Tools.s2b(sReqID, super.body, 0, 10, (byte) 32);
   Tools.s2b(sAgent, super.body, 10, 6, (byte) 32);
   super.body[16] = bStatus;
   for (int i = 17; i < 17 + b.length; i++) super.body[i] = b[i - 17];
 }
Пример #2
0
 protected void init() {
   byte b[] = super.body;
   sReqID = Tools.b2s(b, 0, 10, (byte) 32);
   sAgent = Tools.b2s(b, 10, 6, (byte) 32);
   bStatus = b[16];
   try {
     sMsg = new String(b, 17, b.length - 17);
   } catch (Exception exception) {
   }
 }