1 package org.jbpm.context.exe.converter; 2 3 import org.jbpm.bytes.ByteArray; 4 import org.jbpm.context.exe.Converter; 5 6 public class BytesToByteArrayConverter implements Converter { 7 8 private static final long serialVersionUID = 1L; 9 10 public boolean supports(Class clazz) { 11 return (clazz==byte[].class); 12 } 13 14 public Object convert(Object o) { 15 return new ByteArray((byte[]) o); 16 } 17 18 public Object revert(Object o) { 19 return ((ByteArray)o).getBytes(); 20 } 21 22 } 23 | Popular Tags |