code: static Moment readTimestamp(
          DataInput in,
          boolean positiveLS,
          boolean hasNanos
      ) throws IOException {
  
          long unixTime = in.readLong();
          int nano = (hasNanos ? in.readInt() : 0);
  
          if (unixTime == 0) {
              if (positiveLS) {
                  throw new InvalidObjectException(
                      "UTC epoch is no leap second.");
              } else if (nano == 0) {
                  return UNIX_EPOCH;
              }
          }
  
          if (
              (unixTime == MIN_LIMIT)
              && (nano == 0)
          ) {
              if (positiveLS) {
                  throw new InvalidObjectException("Minimum is no leap second.");
              }
              return MIN;
          } else if (
              (unixTime == MAX_LIMIT)
              && (nano == MRD - 1)
          ) {
              if (positiveLS) {
                  throw new InvalidObjectException("Maximum is no leap second.");
              }
              return MAX;
          } else {
              checkFraction(nano);
          }
  
          if (positiveLS) {
              LeapSeconds ls = LeapSeconds.getInstance();
              if (
                  !ls.isEnabled() // keep LS-state when propagating to next vm
                  || ls.isPositiveLS(ls.enhance(unixTime) + 1)
              ) {
                  nano |= POSITIVE_LEAP_MASK;
              } else {
                  long packed = GregorianMath.toPackedDate(unixTime);
                  int month = GregorianMath.readMonth(packed);
                  int day = GregorianMath.readDayOfMonth(packed);
                  throw new InvalidObjectException(
                      "Not registered as leap second event: "
                      + GregorianMath.readYear(packed)
                      + "-"
                      + ((month < 10) ? "0" : "")
                      + month
                      + ((day < 10) ? "0" : "")
                      + day
                      + " [Please check leap second configurations "
                      + "either of emitter vm or this target vm]"
                  );
              }
          }
  
          return new Moment(nano, unixTime);
  
      }
docs: Deserialisierungsmethode.
  
  @param   in          input stream
  @param   positiveLS  positive leap second indicated?
  @return  deserialized instance
  @throws  IOException in case of I/O-errors