protected Writer createWriter(OutputStream outStream, String encoding) throws UnsupportedEncodingException {
        return new BufferedWriter(
            new OutputStreamWriter( outStream, encoding )
        );
    }
Get an OutputStreamWriter, use preferred encoding.
@param outStream the outut stream
@param encoding the encoding of the stream
@return the IO writer
@throws UnsupportedEncodingException if the encoding is not support
xmppserver/src/main/java/org/jivesoftware/util/XMLWriter.java