docs: static SimpleConfigOrigin readOrigin(DataInput in, SimpleConfigOrigin baseOrigin)
              throws IOException {
          Map<SerializedField, Object> m = new EnumMap<SerializedField, Object>(SerializedField.class);
          while (true) {
              Object v = null;
              SerializedField field = readCode(in);
              switch (field) {
              case END_MARKER:
                  return SimpleConfigOrigin.fromBase(baseOrigin, m);
              case ORIGIN_DESCRIPTION:
                  in.readInt(); // discard length
                  v = in.readUTF();
                  break;
              case ORIGIN_LINE_NUMBER:
                  in.readInt(); // discard length
                  v = in.readInt();
                  break;
              case ORIGIN_END_LINE_NUMBER:
                  in.readInt(); // discard length
                  v = in.readInt();
                  break;
              case ORIGIN_TYPE:
                  in.readInt(); // discard length
                  v = in.readUnsignedByte();
                  break;
              case ORIGIN_URL:
                  in.readInt(); // discard length
                  v = in.readUTF();
                  break;
              case ORIGIN_RESOURCE:
                  in.readInt(); // discard length
                  v = in.readUTF();
                  break;
              case ORIGIN_COMMENTS:
                  in.readInt(); // discard length
                  int size = in.readInt();
                  List<String> list = new ArrayList<String>(size);
                  for (int i = 0; i < size; ++i) {
                      list.add(in.readUTF());
                  }
                  v = list;
                  break;
              case ORIGIN_NULL_URL: // FALL THRU
              case ORIGIN_NULL_RESOURCE: // FALL THRU
              case ORIGIN_NULL_COMMENTS:
                  // nothing to read besides code and length
                  in.readInt(); // discard length
                  v = ""; // just something non-null to put in the map
                  break;
              case ROOT_VALUE:
              case ROOT_WAS_CONFIG:
              case VALUE_DATA:
              case VALUE_ORIGIN:
                  throw new IOException("Not expecting this field here: " + field);
              case UNKNOWN:
                  // skip unknown field
                  skipField(in);
                  break;
              }
              if (v != null)
                  m.put(field, v);
          }
      }