code: static EraPreference readFromStream(DataInput in) throws IOException {
  
          int n = in.readByte();
  
          if (n == NON_DEFAULT_MARKER) {
              HistoricEra era = HistoricEra.valueOf(in.readUTF());
              long mjdStart = in.readLong();
              long mjdEnd = in.readLong();
  
              return new EraPreference(
                  era,
                  PROTOTYPE.with(EpochDays.MODIFIED_JULIAN_DATE, mjdStart),
                  PROTOTYPE.with(EpochDays.MODIFIED_JULIAN_DATE, mjdEnd));
          }
  
          return DEFAULT;
  
      }
docs: used in deserialization