Class ReaderEditor
java.lang.Object
java.beans.PropertyEditorSupport
org.springframework.beans.propertyeditors.ReaderEditor
- All Implemented Interfaces:
PropertyEditor
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!
- Since:
- 4.2
- Author:
- Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorDescriptionCreate a new ReaderEditor, using the default ResourceEditor underneath.ReaderEditor
(ResourceEditor resourceEditor) Create a new ReaderEditor, using the given ResourceEditor underneath. -
Method Summary
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
-
Constructor Details
-
ReaderEditor
public ReaderEditor()Create a new ReaderEditor, using the default ResourceEditor underneath. -
ReaderEditor
Create a new ReaderEditor, using the given ResourceEditor underneath.- Parameters:
resourceEditor
- the ResourceEditor to use
-
-
Method Details
-
setAsText
- Specified by:
setAsText
in interfacePropertyEditor
- Overrides:
setAsText
in classPropertyEditorSupport
- Throws:
IllegalArgumentException
-
getAsText
This implementation returnsnull
to indicate that there is no appropriate text representation.- Specified by:
getAsText
in interfacePropertyEditor
- Overrides:
getAsText
in classPropertyEditorSupport
-