类 ReaderEditor
- java.lang.Object
- java.beans.PropertyEditorSupport
- org.springframework.beans.propertyeditors.ReaderEditor
- 所有已实现的接口:
PropertyEditor
public class ReaderEditor extends PropertyEditorSupport
One-way PropertyEditor which can convert from a text String to ajava.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!
- 从以下版本开始:
- 4.2
- 作者:
- Juergen Hoeller
- 另请参阅:
Reader
,ResourceEditor
,ResourceLoader
,InputStreamEditor
构造器概要
构造器 构造器 说明 ReaderEditor()
Create a new ReaderEditor, using the default ResourceEditor underneath.ReaderEditor(ResourceEditor resourceEditor)
Create a new ReaderEditor, using the given ResourceEditor underneath.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getAsText()
This implementation returnsnull
to indicate that there is no appropriate text representation.void
setAsText(String text)
构造器详细资料
ReaderEditor
public ReaderEditor()
Create a new ReaderEditor, using the default ResourceEditor underneath.
ReaderEditor
public ReaderEditor(ResourceEditor resourceEditor)
Create a new ReaderEditor, using the given ResourceEditor underneath.- 参数:
resourceEditor
- the ResourceEditor to use
方法详细资料
setAsText
public void setAsText(String text) throws IllegalArgumentException
- 指定者:
setAsText
在接口中PropertyEditor
- 覆盖:
setAsText
在类中PropertyEditorSupport
- 抛出:
IllegalArgumentException
getAsText
public String getAsText()
This implementation returnsnull
to indicate that there is no appropriate text representation.- 指定者:
getAsText
在接口中PropertyEditor
- 覆盖:
getAsText
在类中PropertyEditorSupport