Class StringMultipartFileEditor
- java.lang.Object
- java.beans.PropertyEditorSupport
- org.springframework.web.multipart.support.StringMultipartFileEditor
- All Implemented Interfaces:
PropertyEditor
public class StringMultipartFileEditor extends PropertyEditorSupport
CustomPropertyEditor
for convertingMultipartFiles
to Strings.Allows one to specify the charset to use.
- Since:
- 13.10.2003
- Author:
- Juergen Hoeller
Constructor Summary
Constructors Constructor Description StringMultipartFileEditor()
Create a newStringMultipartFileEditor
, using the default charset.StringMultipartFileEditor(String charsetName)
Create a newStringMultipartFileEditor
, using the given charset.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setAsText(String text)
void
setValue(Object value)
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getAsText, getCustomEditor, getJavaInitializationString, getSource, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setSource, supportsCustomEditor
Constructor Detail
StringMultipartFileEditor
public StringMultipartFileEditor()
Create a newStringMultipartFileEditor
, using the default charset.
StringMultipartFileEditor
public StringMultipartFileEditor(String charsetName)
Create a newStringMultipartFileEditor
, using the given charset.- Parameters:
charsetName
- valid charset name- See Also:
String(byte[],String)
Method Detail
setAsText
public void setAsText(String text)
- Specified by:
setAsText
in interfacePropertyEditor
- Overrides:
setAsText
in classPropertyEditorSupport
setValue
public void setValue(Object value)
- Specified by:
setValue
in interfacePropertyEditor
- Overrides:
setValue
in classPropertyEditorSupport