KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > quercus > lib > dom > DOMCharacterData


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  *
23  * Free Software Foundation, Inc.
24  * 59 Temple Place, Suite 330
25  * Boston, MA 02111-1307 USA
26  *
27  * @author Sam
28  */

29
30 package com.caucho.quercus.lib.dom;
31
32 import org.w3c.dom.CharacterData JavaDoc;
33
34 public class DOMCharacterData<T extends CharacterData JavaDoc>
35   extends DOMNode<T>
36 {
37   protected DOMCharacterData(DOMImplementation impl, T delegate)
38   {
39     super(impl, delegate);
40   }
41
42   public void appendData(String JavaDoc arg)
43     throws DOMException
44   {
45     _delegate.appendData(arg);
46   }
47
48   public void deleteData(int offset, int count)
49     throws DOMException
50   {
51     try {
52       _delegate.deleteData(offset, count);
53     }
54     catch (org.w3c.dom.DOMException JavaDoc ex) {
55       throw wrap(ex);
56     }
57   }
58
59   public String JavaDoc getData()
60     throws DOMException
61   {
62     try {
63       return _delegate.getData();
64     }
65     catch (org.w3c.dom.DOMException JavaDoc ex) {
66       throw wrap(ex);
67     }
68   }
69
70   public int getLength()
71   {
72     return _delegate.getLength();
73   }
74
75   public void insertData(int offset, String JavaDoc arg)
76     throws DOMException
77   {
78     try {
79       _delegate.insertData(offset, arg);
80     }
81     catch (org.w3c.dom.DOMException JavaDoc ex) {
82       throw wrap(ex);
83     }
84   }
85
86   public void replaceData(int offset, int count, String JavaDoc arg)
87     throws DOMException
88   {
89     try {
90       _delegate.replaceData(offset, count, arg);
91     }
92     catch (org.w3c.dom.DOMException JavaDoc ex) {
93       throw wrap(ex);
94     }
95   }
96
97   public void setData(String JavaDoc data)
98     throws DOMException
99   {
100     try {
101       _delegate.setData(data);
102     }
103     catch (org.w3c.dom.DOMException JavaDoc ex) {
104       throw wrap(ex);
105     }
106   }
107
108   public String JavaDoc substringData(int offset, int count)
109     throws DOMException
110   {
111     try {
112       return _delegate.substringData(offset, count);
113     }
114     catch (org.w3c.dom.DOMException JavaDoc ex) {
115       throw wrap(ex);
116     }
117   }
118 }
119
Popular Tags