private String skipAndReadFileName(boolean hasFileName, int skipBytes, SignalInputStream in)
     throws IOException {
   if (hasFileName) {
     in.skipBytes(skipBytes);
     return in.readString();
   }
   return "";
 }
 private MonitorExtendedErrorInfo skipAndReadExtended(
     boolean hasExtended, int skipBytes, SignalInputStream in) throws IOException {
   if (hasExtended) {
     in.skipBytes(skipBytes);
     MonitorExtendedErrorInfo extended = new MonitorExtendedErrorInfo();
     extended.read(in);
     return extended;
   }
   return null;
 }