public class

FileEditor

extends PropertyEditorSupport
java.lang.Object
   ↳ java.beans.PropertyEditorSupport
     ↳ org.springframework.beans.propertyeditors.FileEditor

Class Overview

Editor for java.io.File, to directly populate a File property from a Spring resource location.

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

NOTE: The behavior of this editor has changed in Spring 2.0. Previously, it created a File instance directly from a filename. As of Spring 2.0, it takes a standard Spring resource location as input; this is consistent with URLEditor and InputStreamEditor now.

NOTE: In Spring 2.5 the following modification was made. If a file name is specified without a URL prefix or without an absolute path then we try to locate the file using standard ResourceLoader semantics. If the file was not found, then a File instance is created assuming the file name refers to a relative file location.

Summary

Public Constructors
FileEditor()
Create a new FileEditor, using the default ResourceEditor underneath.
FileEditor(ResourceEditor resourceEditor)
Create a new FileEditor, using the given ResourceEditor underneath.
Public Methods
String getAsText()
void setAsText(String text)
[Expand]
Inherited Methods
From class java.beans.PropertyEditorSupport
From class java.lang.Object
From interface java.beans.PropertyEditor

Public Constructors

public FileEditor ()

Also: SpringBeans

Create a new FileEditor, using the default ResourceEditor underneath.

public FileEditor (ResourceEditor resourceEditor)

Create a new FileEditor, using the given ResourceEditor underneath.

Parameters
resourceEditor the ResourceEditor to use

Public Methods

public String getAsText ()

public void setAsText (String text)