1 16 package org.apache.cocoon.forms.util; 17 18 import java.util.Arrays ; 19 20 import org.apache.excalibur.xml.sax.XMLizable; 21 import org.xml.sax.ContentHandler ; 22 import org.xml.sax.SAXException ; 23 24 31 public class StringMessage implements XMLizable { 32 private char[] ch; 33 34 public StringMessage(String message) { 35 this.ch = message.toCharArray(); 36 } 37 38 public void toSAX(ContentHandler contentHandler) throws SAXException { 39 contentHandler.characters(ch, 0, ch.length); 40 } 41 42 public boolean equals(Object obj) { 43 if (obj instanceof StringMessage) { 44 return Arrays.equals(this.ch, ((StringMessage)obj).ch); 46 } else { 47 return false; 48 } 49 } 50 } 51 | Popular Tags |