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
-
Constructor Summary
ConstructorDescriptionTextReader
(String resourceUrl) TextReader
(org.springframework.core.io.Resource resource) -
Method Summary
Modifier and TypeMethodDescriptionget()
Metadata associated with all documents created by the loader.protected String
getResourceIdentifier
(org.springframework.core.io.Resource resource) void
setCharset
(Charset charset) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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