in);
} catch (final IOException e) {
throw new FormDataParamException(e, parameter.getSourceName(), parameter.getDefaultValue());
}
} else if (extractor != null) {
final MultivaluedMap<String, String> map = new MultivaluedStringMap();
try {
if (formDataBodyPart != null) {
for (final FormDataBodyPart p : formDataBodyParts) {
mediaType = p.getMediaType();
reader = messageBodyWorkers.getMessageBodyReader(
String.class,
String.class,
parameter.getAnnotations(),
mediaType);
@SuppressWarnings("unchecked") final String value = (String) reader.readFrom(
String.class,
String.class,
parameter.getAnnotations(),
mediaType,
request.getHeaders(),
((BodyPartEntity) p.getEntity()).getInputStream());
map.add(parameter.getSourceName(), value);
}
}
return extractor.extract(map);
} catch (final IOException | ExtractorException ex) {
throw new FormDataParamException(ex, extractor.getName(), extractor.getDefaultValueString());