@SuppressWarnings("rawtypes")
    public Object convert(Class destClass, Object srcObj) {
        // Boolean to Int not supported in apache common's int converter and this is why this class is req'd
        if (Boolean.class.isAssignableFrom(srcObj.getClass())) {
            boolean value = (Boolean)srcObj;
            return value ? (byte)1 : (byte)0;
        } else if (MappingUtils.isEnumType(srcObj.getClass())) {
            return ((Integer)((Enum)srcObj).ordinal()).byteValue();
        } else {
            return commonsConverter.convert(destClass, srcObj);
        }
    }
Internal class for converting Supported Data Types to Byte. Only intended for internal use.
core/src/main/java/com/github/dozermapper/core/converters/ByteConverter.java