code: @Beta
    @MustBeClosed
    public Stream<String> lines() throws IOException {
      BufferedReader reader = openBufferedStream();
      return reader
          .lines()
          .onClose(
              () -> {
                try {
                  reader.close();
                } catch (IOException e) {
                  throw new UncheckedIOException(e);
                }
              });
    }
docs: Opens a new {@link Stream} for reading text one line at a time from this source. This method
  returns a new, independent stream each time it is called.
  
  <p>The returned stream is lazy and only reads from the source in the terminal operation. If an
  I/O error occurs while the stream is reading from the source or when the stream is closed, an
  {@link UncheckedIOException} is thrown.
  
  <p>Like {@link BufferedReader#readLine()}, this method considers a line to be a sequence of
  text that is terminated by (but does not include) one of {@code \r\n}, {@code \r} or {@code
  \n}. If the source's content does not end in a line termination sequence, it is treated as if
  it does.
  
  <p>The caller is responsible for ensuring that the returned stream is closed. For example:
  
  <pre>{@code
  try (Stream<String> lines = source.lines()) {
  lines.map(...)
  .filter(...)
  .forEach(...);
  }
  }</pre>
  
  @throws IOException if an I/O error occurs while opening the stream
  @since 22.0