Please add the following override to PDataType.BINARY, though:

    BINARY("BINARY", Types.BINARY, byte[].class, null) {
        @Override
        public Integer getMaxLength(Object o) {
            if (o == null) {
                return null;
            }
            byte[] value = (byte[])  o;
            return value.length;
        }