public class ReaderEditor extends PropertyEditorSupport
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!
Reader
,
ResourceEditor
,
ResourceLoader
,
InputStreamEditor
Constructor and Description |
---|
ReaderEditor()
Create a new ReaderEditor, using the default ResourceEditor underneath.
|
ReaderEditor(ResourceEditor resourceEditor)
Create a new ReaderEditor, using the given ResourceEditor underneath.
|
Modifier and Type | Method and Description |
---|---|
String |
getAsText()
This implementation returns
null to indicate that
there is no appropriate text representation. |
void |
setAsText(String text) |
addPropertyChangeListener, firePropertyChange, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, setValue, supportsCustomEditor
public ReaderEditor()
public ReaderEditor(ResourceEditor resourceEditor)
resourceEditor
- the ResourceEditor to usepublic void setAsText(String text) throws IllegalArgumentException
setAsText
in interface PropertyEditor
setAsText
in class PropertyEditorSupport
IllegalArgumentException
@Nullable public String getAsText()
null
to indicate that
there is no appropriate text representation.getAsText
in interface PropertyEditor
getAsText
in class PropertyEditorSupport