Context context = getContext();
InputStream is = null;
// Determine if content is provided
RequestContent content =
RestUtil.getRequestContent(m_servletRequest, headers);
if (content != null && content.getContentStream() != null) {
if (ignoreMime) {
is = content.getContentStream();
} else {
// Make sure content is XML or ZIP
String contentMime = content.getMimeType();
if (contentMime != null) {
MediaType t = MediaType.valueOf(contentMime);
if (TEXT_XML.isCompatible(t) || APP_ZIP.isCompatible(t)) {
is = content.getContentStream();
}
}
}
}