public XmlSerializer startTag(String namespace, String name)
            throws IOException {
        check(false);

        //        if (namespace == null)
        //            namespace = "";

        if (indent[depth]) {
            writer.write("\r\n");
            for (int i = 0; i < depth; i++) {
                writer.write("  ");
            }
        }

        int esp = depth * 3;

        if (elementStack.length < esp + 3) {
            String[] hlp = new String[elementStack.length + 12];
            System.arraycopy(elementStack, 0, hlp, 0, esp);
            elementStack = hlp;
        }

        String prefix =
                namespace == null
                        ? ""
                        : getPrefix(namespace, true, true);

        if (namespace != null && StringUtils.isEmpty(namespace)) {
            for (int i = nspCounts[depth]; i < nspCounts[depth + 1]; i++) {
                if (StringUtils.isEmpty(nspStack[i * 2]) && StringUtils.isNotEmpty(nspStack[i * 2 + 1])) {
                    throw new IllegalStateException("Cannot set default namespace for elements in no namespace");
                }
            }
        }

        elementStack[esp++] = namespace;
        elementStack[esp++] = prefix;
        elementStack[esp] = name;

        writer.write('<');
        if (StringUtils.isNotEmpty(prefix)) {
            writer.write(prefix);
            writer.write(':');
        }

        writer.write(name);

        pending = true;

        return this;
    }
size (in characters) for the write buffer
main/thirdparty/cgeo/org/kxml2/io/KXmlSerializer.java