Revision 3952,
963 bytes
checked in by alexandrecorreia, 14 years ago
(diff) |
Ticket #1710 - Adicao do codigo fonte java do componente jmessenger(jabberit_messenger)
|
-
Property svn:executable set to
*
|
Line | |
---|
1 | package nu.fw.jeti.jabber.handlers; |
---|
2 | import org.xml.sax.Attributes; |
---|
3 | |
---|
4 | /** |
---|
5 | * <p>Title: im</p> |
---|
6 | * <p>Description: </p> |
---|
7 | * <p>Copyright: Copyright (c) 2001</p> |
---|
8 | * <p>Company: </p> |
---|
9 | * @author E.S. de Boer |
---|
10 | * @version 1.0 |
---|
11 | */ |
---|
12 | |
---|
13 | abstract public class BaseHandler |
---|
14 | { |
---|
15 | private StringBuffer currentChars = new StringBuffer(); |
---|
16 | |
---|
17 | public void characters(String text) |
---|
18 | {// append text to buffer because parser likes to cut text |
---|
19 | currentChars.append(text); |
---|
20 | } |
---|
21 | |
---|
22 | public String getText() |
---|
23 | {//return text between elements |
---|
24 | return currentChars.toString().trim(); |
---|
25 | } |
---|
26 | |
---|
27 | public StringBuffer getUntrimmedText() |
---|
28 | {//return text between elements |
---|
29 | return currentChars; |
---|
30 | } |
---|
31 | |
---|
32 | public void clearCurrentChars() |
---|
33 | { |
---|
34 | currentChars = new StringBuffer(); |
---|
35 | } |
---|
36 | |
---|
37 | abstract public void startHandling(Attributes attr); |
---|
38 | |
---|
39 | //abstract public void build(); |
---|
40 | |
---|
41 | public void endElement(String name){clearCurrentChars();} |
---|
42 | } |
---|
43 | |
---|
44 | /* |
---|
45 | * Overrides for emacs |
---|
46 | * Local variables: |
---|
47 | * tab-width: 4 |
---|
48 | * End: |
---|
49 | */ |
---|
Note: See
TracBrowser
for help on using the repository browser.