1 16 17 package org.springframework.beans.propertyeditors; 18 19 import java.beans.PropertyEditorSupport ; 20 21 29 public class ByteArrayPropertyEditor extends PropertyEditorSupport { 30 31 public void setAsText(String text) { 32 setValue(text != null ? text.getBytes() : null); 33 } 34 35 public String getAsText() { 36 byte[] value = (byte[]) getValue(); 37 return (value != null ? new String (value) : ""); 38 } 39 40 } 41 | Popular Tags |