public void readData(DataInput din) throws IOException {
  m_length=din.readUnsignedByte();
  if (m_length < 2 || m_length > 255) {
    return;
  }
  m_slaveId=din.readUnsignedByte();
  m_status=din.readUnsignedByte();
  m_data=new byte[m_length - 2];
  if (m_length > 2) {
    din.readFully(m_data,0,m_length - 2);
  }
}

public void readData ( DataInput din ) throws IOException { m_length = din . readUnsignedByte ( ) ; if ( m_length < 2 || m_length > 255 ) { return ; } m_slaveId = din . readUnsignedByte ( ) ; m_status = din . readUnsignedByte ( ) ; m_data = new byte [ m_length - 2 ] ; if ( m_length > 2 ) { din . readFully ( m_data , 0 , m_length - 2 ) ; } }
readdata - - input the modbus message from din . if there was a header , such as for modbus / tcp , it will have been read already .
