public Object convert(Object existingDestinationFieldValue, Object sourceFieldValue, Class<?> destinationClass, Class<?> sourceClass) {
if (sourceFieldValue == null) {
return null;
}
if (!(sourceFieldValue instanceof java.nio.ByteBuffer)) {
throw new MappingException("Converter " + this.getClass().toString() + " used incorrectly. Arguments passed in were:"
+ existingDestinationFieldValue + " and " + sourceFieldValue);
}
return charset.decode((ByteBuffer) sourceFieldValue).toString();
}