String charset = responseContentType.getAttributes().get("charset"); if (charset == null) { charset = "iso8859-1"; // http default encoding
String charset = responseContentType.getAttributes().get("charset"); if (charset == null) { charset = "iso8859-1"; // http default encoding
String charset = responseContentType.getAttributes().get("charset"); if (charset == null) { charset = "iso8859-1"; // http default encoding
contentType.getAttributes().remove(ContentType.ATTR_CHARSET);
contentType.getAttributes().remove(ContentType.ATTR_CHARSET);
/** * Generate an Atom XML representation of the current object. */ @Override public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException { List<XmlWriter.Attribute> attributes = new ArrayList<XmlWriter.Attribute>(4); if (code > 0) { attributes.add(new XmlWriter.Attribute("code", Integer.toString(code))); } if (reason != null) { attributes.add(new XmlWriter.Attribute("reason", reason)); } if (contentType != null) { // Charset makes no sense in this context contentType.getAttributes().remove(ContentType.ATTR_CHARSET); attributes.add(new XmlWriter.Attribute("content-type", contentType.toString())); } generateStartElement(w, Namespaces.batchNs, "status", attributes, null); generateExtensions(w, extProfile); if (content != null) { w.characters(content); } w.endElement(Namespaces.batchNs, "status"); }
/** * Generate an Atom XML representation of the current object. */ @Override public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException { List<XmlWriter.Attribute> attributes = new ArrayList<XmlWriter.Attribute>(4); if (code > 0) { attributes.add(new XmlWriter.Attribute("code", Integer.toString(code))); } if (reason != null) { attributes.add(new XmlWriter.Attribute("reason", reason)); } if (contentType != null) { // Charset makes no sense in this context contentType.getAttributes().remove(ContentType.ATTR_CHARSET); attributes.add(new XmlWriter.Attribute("content-type", contentType.toString())); } generateStartElement(w, Namespaces.batchNs, "status", attributes, null); generateExtensions(w, extProfile); if (content != null) { w.characters(content); } w.endElement(Namespaces.batchNs, "status"); }
contentType.getAttributes().remove(ContentType.ATTR_CHARSET);
/** * Generate an Atom XML representation of the current object. */ @Override public void generate(XmlWriter w, ExtensionProfile extProfile) throws IOException { List<XmlWriter.Attribute> attributes = new ArrayList<XmlWriter.Attribute>(4); if (code > 0) { attributes.add(new XmlWriter.Attribute("code", Integer.toString(code))); } if (reason != null) { attributes.add(new XmlWriter.Attribute("reason", reason)); } if (contentType != null) { // Charset makes no sense in this context contentType.getAttributes().remove(ContentType.ATTR_CHARSET); attributes.add(new XmlWriter.Attribute("content-type", contentType.toString())); } generateStartElement(w, Namespaces.batchNs, "status", attributes, null); generateExtensions(w, extProfile); if (content != null) { w.characters(content); } w.endElement(Namespaces.batchNs, "status"); }