ByteArrayDataSource datasource = new ByteArrayDataSource(in, "multipart/form-data"); MimeMultipart multipart = new MimeMultipart(datasource);
int count = multipart.getCount();
log.debug("count " + count);
for (int i = 0; i < count; i++) {
BodyPart bodyPart = multipart.getBodyPart(i);
if (bodyPart.isMimeType("multipart/mixed")) {
log.info("multipart/mixed" + bodyPart.getContentType());
processMultipart(bodyPart.getContent());
} else if (bodyPart.isMimeType("application/json")) {
} else {
log.warn("default " + bodyPart.getContentType());
}
}