public void readData(DataInput din) throws IOException {
  byteCount=din.readByte();
  status=din.readUnsignedShort();
  eventCount=din.readUnsignedShort();
  messageCount=din.readUnsignedShort();
  events=new byte[byteCount - 6];
  if (events.length > 0) {
    din.readFully(events,0,events.length);
  }
}

public void readData ( DataInput din ) throws IOException { byteCount = din . readByte ( ) ; status = din . readUnsignedShort ( ) ; eventCount = din . readUnsignedShort ( ) ; messageCount = din . readUnsignedShort ( ) ; events = new byte [ byteCount - 6 ] ; if ( events . length > 0 ) { din . readFully ( events , 0 , events . length ) ; } }
readdata - - input the modbus message from din . if there was a header , such as for modbus / tcp , it will have been read already .
