Beispiel #1
0
  /**
   * This is used to write plain text to the output stream without any translation. This is used
   * when writing the start tags and end tags, this is also used to write attribute names.
   *
   * @param plain this is the text to be written to the output
   * @param prefix this is the namespace prefix to be written
   */
  private void write(String plain, String prefix) throws Exception {
    buffer.write(result);
    buffer.clear();

    if (!isEmpty(prefix)) {
      result.write(prefix);
      result.write(':');
    }
    result.write(plain);
  }
Beispiel #2
0
 /**
  * This is used to flush the writer when the XML if it has been buffered. The flush method is used
  * by the node writer after an end element has been written. Flushing ensures that buffering does
  * not affect the result of the node writer.
  */
 public void flush() throws Exception {
   buffer.write(result);
   buffer.clear();
   result.flush();
 }
Beispiel #3
0
 /**
  * This is used to write plain text to the output stream without any translation. This is used
  * when writing the start tags and end tags, this is also used to write attribute names.
  *
  * @param plain this is the text to be written to the output
  */
 private void write(String plain) throws Exception {
   buffer.write(result);
   buffer.clear();
   result.write(plain);
 }
Beispiel #4
0
 /**
  * This is used to write a character to the output stream without any translation. This is used
  * when writing the start tags and end tags, this is also used to write attribute names.
  *
  * @param ch this is the character to be written to the output
  */
 private void write(char ch) throws Exception {
   buffer.write(result);
   buffer.clear();
   result.write(ch);
 }