/** * Parses an InputStream as DOM. * @param in the inputstream to parse. * @param encoding the encoding of the input stream, if not null. * @return the parsed XML DOM. */ public static Document fromInputStream(InputStream in, String encoding) { InputSource is = new InputSource(in); if (encoding != null) { is.setEncoding(encoding); } return fromInputSource(is); }
/** * Parses an InputStream as DOM. * @param in the inputstream to parse. * @param encoding the encoding of the input stream, if not null. * @return the parsed XML DOM. */ public static Document fromInputStream(InputStream in, String encoding) { InputSource is = new InputSource(in); if (encoding != null) { is.setEncoding(encoding); } return fromInputSource(is); }
/** * Parses an InputStream as DOM. * @param in the inputstream to parse. * @param encoding the encoding of the input stream, if not null. * @return the parsed XML DOM. */ public static Document fromInputStream(InputStream in, String encoding) { InputSource is = new InputSource(in); if (encoding != null) { is.setEncoding(encoding); } return fromInputSource(is); }
/** * Set a XML to this request. * The <tt>Content-Type</tt> header of the request is set to <tt>application/xml</tt>. * * @param xml the XML * @return the modified builder */ public RequestBuilder bodyXml(InputSource xml) { return bodyXml(XML.fromInputSource(xml)); }
/** * Set a XML to this request. * The <tt>Content-Type</tt> header of the request is set to <tt>application/xml</tt>. * * @param xml the XML * @return the modified builder */ public RequestBuilder bodyXml(InputSource xml) { return bodyXml(XML.fromInputSource(xml)); }
/** * Set a XML to this request. * The <tt>Content-Type</tt> header of the request is set to <tt>application/xml</tt>. * * @param xml the XML * @return the modified builder */ public RequestBuilder bodyXml(InputSource xml) { return bodyXml(XML.fromInputSource(xml)); }