Class TextReader

java.lang.Object
org.springframework.ai.reader.TextReader
All Implemented Interfaces:
Supplier<List<Document>>, DocumentReader

public class TextReader extends Object implements DocumentReader
Author:
Craig Walls, Christian Tzolov
  • Field Details

  • Constructor Details

    • TextReader

      public TextReader(String resourceUrl)
    • TextReader

      public TextReader(org.springframework.core.io.Resource resource)
  • Method Details

    • setCharset

      public void setCharset(Charset charset)
    • getCharset

      public Charset getCharset()
    • getCustomMetadata

      public Map<String,Object> getCustomMetadata()
      Metadata associated with all documents created by the loader.
      Returns:
      Metadata to be assigned to the output Documents.
    • get

      public List<Document> get()
      Specified by:
      get in interface Supplier<List<Document>>