code: static Startup unpack(String storedForm, MessageHandler mh) {
          if (storedForm != null) {
              if (storedForm.isEmpty()) {
                  return noStartup();
              }
              try {
                  String[] all = storedForm.split(RECORD_SEPARATOR);
                  if (all.length == 1) {
                      // legacy (content only)
                      return new Startup(new StartupEntry(false, "user.jsh", storedForm));
                  } else if (all.length % 4 == 0) {
                      List<StartupEntry> e = new ArrayList<>(all.length / 4);
                      for (int i = 0; i < all.length; i += 4) {
                          final boolean isBuiltIn;
                          switch (all[i]) {
                              case "*":
                                  isBuiltIn = true;
                                  break;
                              case "-":
                                  isBuiltIn = false;
                                  break;
                              default:
                                  throw new IllegalArgumentException("Unexpected StartupEntry kind: " + all[i]);
                          }
                          String name = all[i + 1];
                          String timeStamp = all[i + 2];
                          String content = all[i + 3];
                          if (isBuiltIn) {
                              // update to current definition, use stored if removed/error
                              String resource = getResource(name);
                              if (resource != null) {
                                  content = resource;
                              }
                          }
                          e.add(new StartupEntry(isBuiltIn, name, content, timeStamp));
                      }
                      return new Startup(e);
                  } else {
                      throw new IllegalArgumentException("Unexpected StartupEntry entry count: " + all.length);
                  }
              } catch (Exception ex) {
                  mh.errormsg("jshell.err.corrupted.stored.startup", ex.getMessage());
              }
          }
          return defaultStartup(mh);
      }
docs: Factory method: Unpack from stored form.
  
  @param storedForm the Startup in the form as stored on persistent
  storage (e.g. Preferences)
  @param mh handler for error messages
  @return Startup, or default startup when error (message has been printed)