1 16 package org.apache.cocoon.transformation.helpers; 17 18 25 public final class TextRecorder extends NOPRecorder { 26 27 30 private StringBuffer buffer; 31 32 public TextRecorder() { 33 super(); 34 this.buffer = new StringBuffer (); 35 } 36 37 public void characters(char ary[], int start, int length) { 38 this.buffer.append(ary, start, length); 39 } 40 41 44 public String getText() { 45 return this.buffer.toString().trim(); 46 } 47 48 55 public String getAllText() { 56 return this.buffer.toString(); 57 } 58 } 59 | Popular Tags |