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

URLEditor

open class URLEditor : PropertyEditorSupport

Editor for java.net.URL, to directly populate a URL property instead of using a String property as bridge.

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

Note: A URL must specify a valid protocol, else it will be rejected upfront. However, the target resource does not necessarily have to exist at the time of URL creation; this depends on the specific resource type.

Author
Juergen Hoeller

Since
15.12.2003

See Also
java.net.URLorg.springframework.core.io.ResourceEditororg.springframework.core.io.ResourceLoaderFileEditorInputStreamEditor

Constructors

<init>

URLEditor()

Create a new URLEditor, using a default ResourceEditor underneath.

URLEditor(resourceEditor: ResourceEditor)

Create a new URLEditor, using the given ResourceEditor underneath.

Functions

getAsText

open fun getAsText(): String

setAsText

open fun setAsText(text: String): Unit