public void readBodyContentPart(TreeWriter tree, InputStream bodyStream, String contentType, String charset) throws SaxonApiException, IOException { if (xmlContentType(contentType)) {
public void readBodyContentPart(TreeWriter tree, InputStream bodyStream, String contentType, String charset) throws SaxonApiException, IOException { if (xmlContentType(contentType)) {
if (jsonContentType(contentType)) { requestEntity = new StringEntity(XMLtoJSON.convert(body), ContentType.create(contentType, "UTF-8")); } else if (xmlContentType(contentType)) { Serializer serializer = makeSerializer();
if (jsonContentType(contentType)) { requestEntity = new StringEntity(XMLtoJSON.convert(body), ContentType.create(contentType, "UTF-8")); } else if (xmlContentType(contentType)) { Serializer serializer = makeSerializer();
if (!xmlContentType(contentType) && !textContentType(contentType)) { tree.addAttribute(_encoding, "base64"); if (xmlContentType(partType)) { BufferedReader preader = new BufferedReader(new InputStreamReader(partStream, charset));
if (!xmlContentType(contentType) && !textContentType(contentType)) { tree.addAttribute(_encoding, "base64"); if (xmlContentType(partType)) { BufferedReader preader = new BufferedReader(new InputStreamReader(partStream, charset));
if (!detailed && (xmlContentType(contentType) || jsonContentType(contentType))) { readBodyContentPart(tree, bodyStream, contentType, charset); } else { tree.addStartElement(XProcConstants.c_body); tree.addAttribute(_content_type, contentType); if (!xmlContentType(contentType) && !textContentType(contentType) && !jsonContentType(contentType)) { tree.addAttribute(_encoding, "base64");
if (!detailed && (xmlContentType(contentType) || jsonContentType(contentType))) { readBodyContentPart(tree, bodyStream, contentType, charset); } else { tree.addStartElement(XProcConstants.c_body); tree.addAttribute(_content_type, contentType); if (!xmlContentType(contentType) && !textContentType(contentType) && !jsonContentType(contentType)) { tree.addAttribute(_encoding, "base64");
if (xmlContentType(bodyContentType)) { Serializer serializer = makeSerializer();
if (xmlContentType(bodyContentType)) { Serializer serializer = makeSerializer();
if ((xmlContentType(contentType) && overrideContentType.startsWith("image/")) || (contentType.startsWith("text/") && overrideContentType.startsWith("image/")) || (contentType.startsWith("image/") && xmlContentType(overrideContentType)) || (contentType.startsWith("image/") && overrideContentType.startsWith("text/")) || (contentType.startsWith("multipart/") && !overrideContentType.startsWith("multipart/"))
if ((xmlContentType(contentType) && overrideContentType.startsWith("image/")) || (contentType.startsWith("text/") && overrideContentType.startsWith("image/")) || (contentType.startsWith("image/") && xmlContentType(overrideContentType)) || (contentType.startsWith("image/") && overrideContentType.startsWith("text/")) || (contentType.startsWith("multipart/") && !overrideContentType.startsWith("multipart/"))