public void setOutput(OutputStream os, String encoding)
            throws IOException {
        if (os == null) {
            throw new IllegalArgumentException("os == null");
        }
        setOutput(encoding == null
                ? new OutputStreamWriter(os)
                : new OutputStreamWriter(os, encoding));
        this.encoding = encoding;
        if (encoding != null && encoding.toLowerCase(Locale.US).startsWith("utf")) {
            unicode = true;
        }
    }
size (in characters) for the write buffer
main/thirdparty/cgeo/org/kxml2/io/KXmlSerializer.java