public Multipart readFrom(Class<Multipart> type, Type genericType,
Annotation[] annotations, MediaType mediaType,
MultivaluedMap<String, String> httpResponseHeaders,
InputStream entityStream) throws IOException {
final String contentType = "multipart/form-data";
final DataSource ds = new ByteArrayDataSource(entityStream, contentType);
try {
return new MimeMultipart(ds);
} catch (MessagingException e) {
if (e.getCause() instanceof IOException) {
throw (IOException) e.getCause();