Package org.springframework.ai.reader
Class TextReader
java.lang.Object
org.springframework.ai.reader.TextReader
- All Implemented Interfaces:
Supplier<List<Document>>,DocumentReader
A
DocumentReader that reads text from a Resource.- Author:
- Craig Walls, Christian Tzolov
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTextReader(String resourceUrl) TextReader(org.springframework.core.io.Resource resource) -
Method Summary
Modifier and TypeMethodDescriptionget()Metadata associated with all documents created by the loader.protected StringgetResourceIdentifier(org.springframework.core.io.Resource resource) voidsetCharset(Charset charset) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.ai.document.DocumentReader
read
-
Field Details
-
CHARSET_METADATA
- See Also:
-
SOURCE_METADATA
- See Also:
-
-
Constructor Details
-
TextReader
-
TextReader
public TextReader(org.springframework.core.io.Resource resource)
-
-
Method Details