code: private ArrayList<Tick> parseBinary(byte [] binaryPackets) {
          ArrayList<Tick> ticks = new ArrayList<Tick>();
          ArrayList<byte[]> packets = splitPackets(binaryPackets);
          for (int i = 0; i < packets.size(); i++) {
              byte[] bin = packets.get(i);
              byte[] t = Arrays.copyOfRange(bin, 0, 4);
              int x = ByteBuffer.wrap(t).getInt();
  
              //int token = x >> 8;
              int segment = x & 0xff;
  
              int dec1 = (segment == NseCD) ? 10000000 : 100;
  
              if(bin.length == 8) {
                  Tick tick = getLtpQuote(bin, x, dec1);
                  ticks.add(tick);
              }else if(bin.length == 28 || bin.length == 32) {
                  Tick tick = getIndeciesData(bin, x);
                  ticks.add(tick);
              }else if(bin.length == 44) {
                  Tick tick = getQuoteData(bin, x, dec1);
                  ticks.add(tick);
              } else if(bin.length == 184) {
                  Tick tick = getQuoteData(bin, x, dec1);
                  tick.setMode(modeFull);
                  ticks.add(getFullData(bin, dec1, tick));
              }
          }
          return ticks;
      }
docs: /*
  This method parses binary data got from kite server to get ticks for each token subscribed.
  we have to keep a main Array List which is global and keep deleting element in the list and add new data element in that place and call notify data set changed.
  @return List of parsed ticks.