java - Message not coming fully -
i need complete message example hello how you. code, getting hello. 
public class messages{     private static final int mtype = 0;     private static final int flags = 1;     private static final int sequence = 2;     private static final int char1 = 3;     private static final int char2 = 4;     private static final int char3 = 5;     private static final int char4 = 6;     private static final int char5 = 7;      private int type = 0;     private boolean ack = false;     private boolean islasttelegram = false;     private boolean isutf8 = false;     private int sequence = 0;     private string messagepart = "";      public inmsgtelegramm(byte[] msg) {          type = msg[mtype] & 0xff;          sequence = msg[sequence] & 0xff;          int ackbyte = (int) ((msg[flags] >> 7) & 1);          ack = ackbyte != 0;          int islasttelegrambyte = (int) ((msg[flags] >> 6) & 1);          islasttelegram = islasttelegrambyte != 0;          int isutf8byte = (int) ((msg[flags] >> 5) & 1);          isutf8 = isutf8byte != 0;          messagepart += (char) msg[char1];         messagepart += (char) msg[char2];         messagepart += (char) msg[char3];         messagepart += (char) msg[char4];         messagepart += (char) msg[char5];     } it messagepart contains 5 characters hello. not in loop. msgis byte array accpets string hello how youbut output hello
rest of parameters except sequence remain same message. how message?
 
 
  
Comments
Post a Comment