protected void read(SignalInputStream in) throws IOException {
    int fileNameOffset; // U32

    super.read(in);
    from = in.readS32();
    exec = in.readBoolean();
    error = in.readS32();
    extra = in.readS32();
    lineNumber = in.readS32();
    fileNameOffset = in.readS32();
    euId = in.readS16();
    in.readS16(); // Unused U16 reserved0
    reserved1 = in.readS32(); // offset to where Extended Info starts
    int before = in.getReadPosition();
    if (reserved1 < fileNameOffset) {
      // read ExtendedErrorInfo first
      monitorExtendedErrorInfo = skipAndReadExtended(reserved1 > 0, reserved1, in);
      int skipBytes = getBytesToSkip(before, fileNameOffset, in);
      fileName = skipAndReadFileName(lineNumber > 0, skipBytes, in);
    } else if (fileNameOffset <= reserved1) {
      // read Filename first
      fileName = skipAndReadFileName(lineNumber > 0, fileNameOffset, in);
      int skipbytes = getBytesToSkip(before, reserved1, in);
      monitorExtendedErrorInfo = skipAndReadExtended(reserved1 > 0, skipbytes, in);
    }
  }
 protected void write(SignalOutputStream out) throws IOException {
   super.write(out);
   out.writeS32(from);
   out.writeBoolean(exec);
   out.writeS32(error);
   out.writeS32(extra);
   out.writeS32(lineNumber);
   out.writeS32(0); // U32 fileNameOffset
   out.writeS16(euId);
   out.writeS16((short) 0); // Unused U16 reserved0
   reserved1 = 0;
   if (monitorExtendedErrorInfo != null) {
     reserved1 = fileName.length() + 1;
   }
   out.writeS32(reserved1); // reserved1
   out.writeString((fileName != null) ? fileName : "");
   if (reserved1 > 0) {
     monitorExtendedErrorInfo.write(out);
   }
 }