spring-framework / org.springframework.beans.propertyeditors / ReaderEditor

ReaderEditor

open class ReaderEditor : PropertyEditorSupport

One-way PropertyEditor which can convert from a text String to a java.io.Reader, interpreting the given String as a Spring resource location (e.g. a URL String).

Supports Spring-style URL notation: any fully qualified standard URL ("file:", "http:", etc.) and Spring's special "classpath:" pseudo-URL.

Note that such readers usually do not get closed by Spring itself!

Author
Juergen Hoeller

Since
4.2

See Also
java.io.Readerorg.springframework.core.io.ResourceEditororg.springframework.core.io.ResourceLoaderInputStreamEditor

Constructors

<init>

ReaderEditor()

Create a new ReaderEditor, using the default ResourceEditor underneath.

ReaderEditor(resourceEditor: ResourceEditor)

Create a new ReaderEditor, using the given ResourceEditor underneath.

Functions

getAsText

open fun getAsText(): String

This implementation returns null to indicate that there is no appropriate text representation.

setAsText

open fun setAsText(text: String): Unit