A FormData writer. @since 24.03.2018 @author Guillaume Simard
| 26 | * @author Guillaume Simard |
| 27 | */ |
| 28 | public class FormDataWriter extends AbstractWriter { |
| 29 | |
| 30 | @Override |
| 31 | public boolean isApplicable(Object value) { |
| 32 | return value instanceof FormData; |
| 33 | } |
| 34 | |
| 35 | @Override |
| 36 | protected void write(Output output, String key, Object value) throws EncodeException { |
| 37 | val formData = (FormData) value; |
| 38 | writeFileMetadata(output, key, formData.getFileName(), formData.getContentType()); |
| 39 | output.write(formData.getData()); |
| 40 | } |
| 41 | } |
nothing calls this directly
no outgoing calls
no test coverage detected