public ContentHandler getXmlWriter(XmlRpcStreamConfig pConfig, OutputStream pStream) throws XmlRpcException { XMLWriter xw = newXmlWriter(); xw.setDeclarating(true); String enc = pConfig.getEncoding(); if (enc == null) { enc = XmlRpcStreamConfig.UTF8_ENCODING; } xw.setEncoding(enc); xw.setIndenting(false); xw.setFlushing(true); try { xw.setWriter(new BufferedWriter(new OutputStreamWriter(pStream, enc))); } catch (UnsupportedEncodingException e) { throw new XmlRpcException("Unsupported encoding: " + enc, e); } return xw; } }
public ContentHandler getXmlWriter(XmlRpcStreamConfig pConfig, OutputStream pStream) throws XmlRpcException { XMLWriter xw = newXmlWriter(); xw.setDeclarating(true); String enc = pConfig.getEncoding(); if (enc == null) { enc = XmlRpcStreamConfig.UTF8_ENCODING; } xw.setEncoding(enc); xw.setIndenting(false); xw.setFlushing(true); try { xw.setWriter(new BufferedWriter(new OutputStreamWriter(pStream, enc))); } catch (UnsupportedEncodingException e) { throw new XmlRpcException("Unsupported encoding: " + enc, e); } return xw; } }
public ContentHandler getXmlWriter(XmlRpcStreamConfig pConfig, OutputStream pStream) throws XmlRpcException { XMLWriter xw = newXmlWriter(); xw.setDeclarating(true); String enc = pConfig.getEncoding(); if (enc == null) { enc = XmlRpcStreamConfig.UTF8_ENCODING; } xw.setEncoding(enc); xw.setIndenting(false); xw.setFlushing(true); try { xw.setWriter(new BufferedWriter(new OutputStreamWriter(pStream, enc))); } catch (UnsupportedEncodingException e) { throw new XmlRpcException("Unsupported encoding: " + enc, e); } return xw; } }