code: public void readFields(DataInput in) throws IOException {
      byte version = in.readByte();                 // read version
      if (version != getVersion())
        throw new VersionMismatchException(getVersion(), version);
    }
docs: javadoc from Writable