View Javadoc
1   package org.csveed.bean.conversion;
2   
3   public class ByteArrayConverter extends AbstractConverter<byte[]> {
4   
5       public ByteArrayConverter() {
6           super(byte[].class);
7       }
8   
9       @Override
10      public byte[] fromString(String text) throws Exception {
11          return text != null ? text.getBytes() : null;
12      }
13  
14      @Override
15      public String toString(byte[] value) throws Exception {
16          return value != null ? new String(value) : "";
17      }
18  }