code: @Override
      public void readExternal(ObjectInput in)
          throws IOException, ClassNotFoundException {
  
          byte header = in.readByte();
          int typeInfo = (header & 0xFF) >> 2;
  
          switch (typeInfo) {
              case DATE_TYPE:
                  this.obj = readDateInterval(in);
                  break;
              case TIME_TYPE:
                  this.obj = readClockInterval(in);
                  break;
              case TIMESTAMP_TYPE:
                  this.obj = readTimestampInterval(in);
                  break;
              case MOMENT_TYPE:
                  this.obj = readMomentInterval(in);
                  break;
              case YEAR_TYPE:
                  this.obj = readCalendarYear(in);
                  break;
              case QUARTER_TYPE:
                  this.obj = readCalendarQuarter(in);
                  break;
              case MONTH_TYPE:
                  this.obj = readCalendarMonth(in);
                  break;
              case WEEK_TYPE:
                  this.obj = readCalendarWeek(in);
                  break;
              case DATE_WINDOW_ID:
                  this.obj = readDateWindows(in);
                  break;
              case CLOCK_WINDOW_ID:
                  this.obj = readClockWindows(in);
                  break;
              case TIMESTAMP_WINDOW_ID:
                  this.obj = readTimestampWindows(in);
                  break;
              case MOMENT_WINDOW_ID:
                  this.obj = readMomentWindows(in);
                  break;
              case GENERIC_WINDOW_ID:
                  this.obj = readGenericWindows(in);
                  break;
              case BOUNDARY_TYPE:
                  this.obj = readBoundary(in, header);
                  break;
              default:
                  throw new StreamCorruptedException("Unknown serialized type.");
          }
  
      }
docs: /*[deutsch]
  <p>Implementierungsmethode des Interface {@link Externalizable}. </p>
  
  @param   in      input stream
  @throws  IOException in case of I/O-problems
  @throws  ClassNotFoundException if class-loading fails