A writer interface. @author Artem Labazin
| 23 | * @author Artem Labazin |
| 24 | */ |
| 25 | public interface Writer { |
| 26 | |
| 27 | /** |
| 28 | * Processing form data to request body. |
| 29 | * |
| 30 | * @param output output writer. |
| 31 | * @param boundary data boundary. |
| 32 | * @param key name for piece of data. |
| 33 | * @param value piece of data. |
| 34 | * @throws EncodeException in case of any encode exception |
| 35 | */ |
| 36 | void write(Output output, String boundary, String key, Object value) throws EncodeException; |
| 37 | |
| 38 | /** |
| 39 | * Answers on question - "could this writer properly write the value". |
| 40 | * |
| 41 | * @param value object to write. |
| 42 | * @return {@code true} - if could write this object, otherwise {@code true} |
| 43 | */ |
| 44 | boolean isApplicable(Object value); |
| 45 | } |
no outgoing calls
no test coverage detected