code: public static int readPid(File pid) {
      try {
        return Integer.parseInt(FileSystemUtils.read(pid));
      }
      catch (IOException | IllegalArgumentException | IllegalStateException e) {
        throw new PidUnknownException(String.format("Failed to read Process ID (PID) from file [%s]", pid), e);
      }
    }
docs: Reads the process ID (pid) from the given {@link File}.
  
  @param pid {@link File} containing the process ID (pid) to read.
  @return the process ID (pid) stored in the given {@link File}.
  @throws PidUnknownException if the process ID (pid) could not be read from the given {@link File}.
  @throws NumberFormatException if the contents of the given {@link File} is not a valid process ID (pid).
  @see java.io.File
  @see #writePid(int)