}
private void checkMultipartContent(Document<Entry> entry, Map<String, String> dataHeaders,
RequestContext request) throws ParseException {
if (entry == null) {
throw new ParseException("multipart/related stream invalid, media link entry is missing");
}
if (!dataHeaders.containsKey(CONTENT_TYPE_HEADER)) {
throw new ParseException("multipart/related stream invalid, data content-type is missing");
}
if (!isContentTypeAccepted(dataHeaders.get(CONTENT_TYPE_HEADER), request)) {
throw new ParseException("multipart/related stream invalid, content-type "
+ dataHeaders.get(CONTENT_TYPE_HEADER) + " not accepted into this multipart file");
}
}