@Override public FileValue readValue(ValueFields valueFields, boolean deserializeValue) { FileValueBuilder builder = Variables.fileValue(valueFields.getTextValue()); if (valueFields.getByteArrayValue() != null) { builder.file(valueFields.getByteArrayValue()); } // to ensure the same array size all the time if (valueFields.getTextValue2() != null) { String[] split = Arrays.copyOf(valueFields.getTextValue2().split(MIMETYPE_ENCODING_SEPARATOR, NR_OF_VALUES_IN_TEXTFIELD2), NR_OF_VALUES_IN_TEXTFIELD2); String mimeType = returnNullIfEmptyString(split[0]); String encoding = returnNullIfEmptyString(split[1]); builder.mimeType(mimeType); builder.encoding(encoding); } return builder.create(); }
@Override public FileValue readValue(ValueFields valueFields, boolean deserializeValue) { FileValueBuilder builder = Variables.fileValue(valueFields.getTextValue()); if (valueFields.getByteArrayValue() != null) { builder.file(valueFields.getByteArrayValue()); } // to ensure the same array size all the time if (valueFields.getTextValue2() != null) { String[] split = Arrays.copyOf(valueFields.getTextValue2().split(MIMETYPE_ENCODING_SEPARATOR, NR_OF_VALUES_IN_TEXTFIELD2), NR_OF_VALUES_IN_TEXTFIELD2); String mimeType = returnNullIfEmptyString(split[0]); String encoding = returnNullIfEmptyString(split[1]); builder.mimeType(mimeType); builder.encoding(encoding); } return builder.create(); }
@Override public FileValue readValue(ValueFields valueFields, boolean deserializeValue) { FileValueBuilder builder = Variables.fileValue(valueFields.getTextValue()); if (valueFields.getByteArrayValue() != null) { builder.file(valueFields.getByteArrayValue()); } // to ensure the same array size all the time if (valueFields.getTextValue2() != null) { String[] split = Arrays.copyOf(valueFields.getTextValue2().split(MIMETYPE_ENCODING_SEPARATOR, NR_OF_VALUES_IN_TEXTFIELD2), NR_OF_VALUES_IN_TEXTFIELD2); String mimeType = returnNullIfEmptyString(split[0]); String encoding = returnNullIfEmptyString(split[1]); builder.mimeType(mimeType); builder.encoding(encoding); } return builder.create(); }