public void writeTo(Map<String, Object> map, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException { PartType partType = FindAnnotation.findAnnotation(annotations, PartType.class); MediaType partMediaType = MediaType.valueOf(partType.value()); MultipartFormDataOutput output = new MultipartFormDataOutput(); for (Map.Entry<String, Object> entry : map.entrySet()) { output.addFormData(entry.getKey(), entry.getValue(), partMediaType); } write(output, mediaType, httpHeaders, entityStream); } }
public void writeTo(Map<String, Object> map, Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, Object> httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException { PartType partType = FindAnnotation.findAnnotation(annotations, PartType.class); MediaType partMediaType = MediaType.valueOf(partType.value()); MultipartFormDataOutput output = new MultipartFormDataOutput(); for (Map.Entry<String, Object> entry : map.entrySet()) { output.addFormData(entry.getKey(), entry.getValue(), partMediaType); } write(output, mediaType, httpHeaders, entityStream); } }