private static ManagerInfo loadManagerInfo(File directory, boolean locator) {
    if (!directory.exists() || !directory.isDirectory()) {
      throw new UncreatedSystemException(
          String.format("%s does not exist or is not a directory.",
              directory.getPath()));
    }
    File infoFile = getManagerInfoFile(directory, locator);
    if (!infoFile.exists()) {
      throw new UnstartedSystemException(String.format("The info file %s does not exist.",
          infoFile.getPath()));
    }
    try {
      FileInputStream fis = new FileInputStream(infoFile);
      if (fis.available() == 0) {
        throw new GemFireIOException(
            String.format(
                "Could not load file %s because the file is empty. Wait for the %s to finish starting.",
                infoFile, (locator ? "locator" : "system")),
            null);
      }
      DataInputStream dis = new DataInputStream(fis);
      ManagerInfo result = DataSerializer.readObject(dis);
      fis.close();
      return result;
    } catch (IOException io) {
      throw new GemFireIOException(
          String.format("Could not load file %s.", infoFile), io);
    } catch (ClassNotFoundException ex) {
      throw new GemFireIOException(
          String.format("Could not load file %s because a class could not be found.",
              infoFile),
          ex);
    }
  }
Gets the status code for the given <code>statusName</code>.

@throws IllegalArgumentException if an unknown status name is given.
geode-core/src/main/java/org/apache/geode/internal/ManagerInfo.java