code: public void readData(DataInput din) throws IOException {
  
          /*
           * Read and discard the byte count.  There's no way to indicate
           * the packet was inconsistent, other than throwing an I/O
           * exception for an invalid packet format ...
           */
          din.readShort();
  
          // The first register is the number of registers which
          // follow.  Save that as count, not as a register.
          count = din.readUnsignedShort();
          registers = new InputRegister[count];
  
          for (int i = 0; i < count; i++) {
              registers[i] = new SimpleInputRegister(din.readShort());
          }
      }
docs: readData -- input the Modbus message from din. If there was a header,
  such as for Modbus/TCP, it will have been read already.
  @throws java.io.IOException If the data cannot be read