code: public static Section readFirstSectionAndClose(Reader reader, String titleToLookFor)
        throws IOException {
      PemReader pemReader = new PemReader(reader);
      try {
        return pemReader.readNextSection(titleToLookFor);
      } finally {
        pemReader.close();
      }
    }
docs: Reads the first section in the PEM file, optionally based on a title to look for, and then
  closes the reader.
  
  @param titleToLookFor title to look for or {@code null} for any title
  @param reader reader
  @return first section found or {@code null} for none found