/** * Returns the charset to use for the form submission. This is the first one * from the list provided in {@link #getAcceptCharsetAttribute()} if any * or the page's charset else * @return the charset to use for the form submission */ private String getSubmitCharset() { if (getAcceptCharsetAttribute().length() > 0) { return getAcceptCharsetAttribute().trim().replaceAll("[ ,].*", ""); } return getPage().getPageEncoding(); }
/** * Returns the charset to use for the form submission. This is the first one * from the list provided in {@link #getAcceptCharsetAttribute()} if any * or the page's charset else * @return the charset to use for the form submission */ private String getSubmitCharset() { if (getAcceptCharsetAttribute().length() > 0) { return getAcceptCharsetAttribute().trim().replaceAll("[ ,].*", ""); } return getPage().getPageEncoding(); }
/** * Returns the charset to use for the form submission. This is the first one * from the list provided in {@link #getAcceptCharsetAttribute()} if any * or the page's charset else * @return the charset to use for the form submission */ private String getSubmitCharset() { if (getAcceptCharsetAttribute().length() > 0) { return getAcceptCharsetAttribute().trim().replaceAll("[ ,].*", ""); } return getPage().getPageEncoding(); }
/** * Converts an HTML element to XML. * @param node a node * @return the text representation according to the setting of this serializer */ public String asXml(final HtmlElement node) { buffer_.setLength(0); indent_.setLength(0); String charsetName = null; if (node.getPage() instanceof HtmlPage) { charsetName = node.getPage().getPageEncoding(); } if (charsetName != null && node instanceof HtmlHtml) { buffer_.append("<?xml version=\"1.0\" encoding=\"").append(charsetName).append("\"?>").append('\n'); } printXml(node); final String response = buffer_.toString(); buffer_.setLength(0); return response; }
/** * Converts an HTML element to XML. * @param node a node * @return the text representation according to the setting of this serializer */ public String asXml(final HtmlElement node) { buffer_.setLength(0); indent_.setLength(0); String charsetName = null; if (node.getPage() instanceof HtmlPage) { charsetName = node.getPage().getPageEncoding(); } if (charsetName != null && node instanceof HtmlHtml) { buffer_.append("<?xml version=\"1.0\" encoding=\"").append(charsetName).append("\"?>").append('\n'); } printXml(node); final String response = buffer_.toString(); buffer_.setLength(0); return response; }
/** * Converts an HTML element to XML. * @param node a node * @return the text representation according to the setting of this serializer */ public String asXml(final HtmlElement node) { buffer_.setLength(0); indent_.setLength(0); String charsetName = null; if (node.getPage() instanceof HtmlPage) { charsetName = node.getPage().getPageEncoding(); } if (charsetName != null && node instanceof HtmlHtml) { buffer_.append("<?xml version=\"1.0\" encoding=\"").append(charsetName).append("\"?>").append('\n'); } printXml(node); final String response = buffer_.toString(); buffer_.setLength(0); return response; }
contentType = contentType_; final String charset = getPage().getPageEncoding(); final KeyDataPair keyDataPair = new KeyDataPair(getNameAttribute(), file, contentType, charset); keyDataPair.setData(data_);
contentType = contentType_; final String charset = getPage().getPageEncoding(); final KeyDataPair keyDataPair = new KeyDataPair(getNameAttribute(), file, contentType, charset); keyDataPair.setData(data_);
contentType = contentType_; final String charset = getPage().getPageEncoding(); final KeyDataPair keyDataPair = new KeyDataPair(getNameAttribute(), file, contentType, charset); keyDataPair.setData(data_);
final String queryFromFields = EncodingUtil.formUrlEncode(pairs, getPage().getPageEncoding());
final String queryFromFields = EncodingUtil.formUrlEncode(pairs, getPage().getPageEncoding());
final String queryFromFields = EncodingUtil.formUrlEncode(pairs, getPage().getPageEncoding());