public void write(char[] cbuf, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(cbuf[off + i]); }
public void write(int c) throws IOException { // the basic idea of this method is to make sure that when a tag // or a text block starts, it is placed on a separate line and // indented an amount appropriate to the XML tree depth if (_lastChar == '<') { // tag or processing instruction? if (c != '?' && c != '!') { // end tag; decrease depth before writing spaces if (c == '/') _depth--; // tags are always on separate lines out.write(_endl); writeSpaces(); // beginning tag; increase depth for tag body if (c != '/') _depth++; } // if this is not a processing instruction / comment, // write the chars if (c != '!') { out.write('<'); out.write(c); } } else if (c == '>') { // if unary tag decrease depth to undo the increase at tag start if (_lastChar == '/')
public void write(int c) throws IOException { // the basic idea of this method is to make sure that when a tag // or a text block starts, it is placed on a separate line and // indented an amount appropriate to the XML tree depth if (_lastChar == '<') { // tag or processing instruction? if (c != '?' && c != '!') { // end tag; decrease depth before writing spaces if (c == '/') _depth--; // tags are always on separate lines out.write(_endl); writeSpaces(); // beginning tag; increase depth for tag body if (c != '/') _depth++; } // if this is not a processing instruction / comment, // write the chars if (c != '!') { out.write('<'); out.write(c); } } else if (c == '>') { // if unary tag decrease depth to undo the increase at tag start if (_lastChar == '/')
public void write(char[] cbuf, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(cbuf[off + i]); }
public void write(int c) throws IOException { // the basic idea of this method is to make sure that when a tag // or a text block starts, it is placed on a separate line and // indented an amount appropriate to the XML tree depth if (_lastChar == '<') { // tag or processing instruction? if (c != '?' && c != '!') { // end tag; decrease depth before writing spaces if (c == '/') _depth--; // tags are always on separate lines out.write(_endl); writeSpaces(); // beginning tag; increase depth for tag body if (c != '/') _depth++; } // if this is not a processing instruction / comment, // write the chars if (c != '!') { out.write('<'); out.write(c); } } else if (c == '>') { // if unary tag decrease depth to undo the increase at tag start if (_lastChar == '/')
public void write(char[] cbuf, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(cbuf[off + i]); }
public void write(int c) throws IOException { // the basic idea of this method is to make sure that when a tag // or a text block starts, it is placed on a separate line and // indented an amount appropriate to the XML tree depth if (_lastChar == '<') { // tag or processing instruction? if (c != '?' && c != '!') { // end tag; decrease depth before writing spaces if (c == '/') _depth--; // tags are always on separate lines out.write(_endl); writeSpaces(); // beginning tag; increase depth for tag body if (c != '/') _depth++; } // if this is not a processing instruction / comment, // write the chars if (c != '!') { out.write('<'); out.write(c); } } else if (c == '>') { // if unary tag decrease depth to undo the increase at tag start if (_lastChar == '/')
public void write(char[] cbuf, int off, int len) throws IOException { for (int i = 0; i < len; i++) write(cbuf[off + i]); }