KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > org > apache > xerces > internal > util > XMLChar


1 /*
2  * The Apache Software License, Version 1.1
3  *
4  *
5  * Copyright (c) 1999-2004 The Apache Software Foundation. All rights
6  * reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Apache Software Foundation (http://www.apache.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "Xerces" and "Apache Software Foundation" must
28  * not be used to endorse or promote products derived from this
29  * software without prior written permission. For written
30  * permission, please contact apache@apache.org.
31  *
32  * 5. Products derived from this software may not be called "Apache",
33  * nor may "Apache" appear in their name, without prior written
34  * permission of the Apache Software Foundation.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47  * SUCH DAMAGE.
48  * ====================================================================
49  *
50  * This software consists of voluntary contributions made by many
51  * individuals on behalf of the Apache Software Foundation and was
52  * originally based on software copyright (c) 1999, International
53  * Business Machines, Inc., http://www.apache.org. For more
54  * information on the Apache Software Foundation, please see
55  * <http://www.apache.org/>.
56  */

57
58 package com.sun.org.apache.xerces.internal.util;
59
60 import java.util.Arrays JavaDoc;
61
62 /**
63  * This class defines the basic XML character properties. The data
64  * in this class can be used to verify that a character is a valid
65  * XML character or if the character is a space, name start, or name
66  * character.
67  * <p>
68  * A series of convenience methods are supplied to ease the burden
69  * of the developer. Because inlining the checks can improve per
70  * character performance, the tables of character properties are
71  * public. Using the character as an index into the <code>CHARS</code>
72  * array and applying the appropriate mask flag (e.g.
73  * <code>MASK_VALID</code>), yields the same results as calling the
74  * convenience methods. There is one exception: check the comments
75  * for the <code>isValid</code> method for details.
76  *
77  * @author Glenn Marcy, IBM
78  * @author Andy Clark, IBM
79  * @author Eric Ye, IBM
80  * @author Arnaud Le Hors, IBM
81  * @author Michael Glavassevich, IBM
82  * @author Rahul Srivastava, Sun Microsystems Inc.
83  *
84  * @version $Id: XMLChar.java,v 1.14 2004/02/03 20:34:27 mrglavas Exp $
85  */

86 public class XMLChar {
87
88     //
89
// Constants
90
//
91

92     /** Character flags. */
93     private static final byte[] CHARS = new byte[1 << 16];
94
95     /** Valid character mask. */
96     public static final int MASK_VALID = 0x01;
97
98     /** Space character mask. */
99     public static final int MASK_SPACE = 0x02;
100
101     /** Name start character mask. */
102     public static final int MASK_NAME_START = 0x04;
103
104     /** Name character mask. */
105     public static final int MASK_NAME = 0x08;
106
107     /** Pubid character mask. */
108     public static final int MASK_PUBID = 0x10;
109     
110     /**
111      * Content character mask. Special characters are those that can
112      * be considered the start of markup, such as '&lt;' and '&amp;'.
113      * The various newline characters are considered special as well.
114      * All other valid XML characters can be considered content.
115      * <p>
116      * This is an optimization for the inner loop of character scanning.
117      */

118     public static final int MASK_CONTENT = 0x20;
119
120     /** NCName start character mask. */
121     public static final int MASK_NCNAME_START = 0x40;
122
123     /** NCName character mask. */
124     public static final int MASK_NCNAME = 0x80;
125
126     //
127
// Static initialization
128
//
129

130     static {
131         
132         // Initializing the Character Flag Array
133
// Code generated by: XMLCharGenerator.
134

135         CHARS[9] = 35;
136         CHARS[10] = 19;
137         CHARS[13] = 19;
138         CHARS[32] = 51;
139         CHARS[33] = 49;
140         CHARS[34] = 33;
141         Arrays.fill(CHARS, 35, 38, (byte) 49 ); // Fill 3 of value (byte) 49
142
CHARS[38] = 1;
143         Arrays.fill(CHARS, 39, 45, (byte) 49 ); // Fill 6 of value (byte) 49
144
Arrays.fill(CHARS, 45, 47, (byte) -71 ); // Fill 2 of value (byte) -71
145
CHARS[47] = 49;
146         Arrays.fill(CHARS, 48, 58, (byte) -71 ); // Fill 10 of value (byte) -71
147
CHARS[58] = 61;
148         CHARS[59] = 49;
149         CHARS[60] = 1;
150         CHARS[61] = 49;
151         CHARS[62] = 33;
152         Arrays.fill(CHARS, 63, 65, (byte) 49 ); // Fill 2 of value (byte) 49
153
Arrays.fill(CHARS, 65, 91, (byte) -3 ); // Fill 26 of value (byte) -3
154
Arrays.fill(CHARS, 91, 93, (byte) 33 ); // Fill 2 of value (byte) 33
155
CHARS[93] = 1;
156         CHARS[94] = 33;
157         CHARS[95] = -3;
158         CHARS[96] = 33;
159         Arrays.fill(CHARS, 97, 123, (byte) -3 ); // Fill 26 of value (byte) -3
160
Arrays.fill(CHARS, 123, 183, (byte) 33 ); // Fill 60 of value (byte) 33
161
CHARS[183] = -87;
162         Arrays.fill(CHARS, 184, 192, (byte) 33 ); // Fill 8 of value (byte) 33
163
Arrays.fill(CHARS, 192, 215, (byte) -19 ); // Fill 23 of value (byte) -19
164
CHARS[215] = 33;
165         Arrays.fill(CHARS, 216, 247, (byte) -19 ); // Fill 31 of value (byte) -19
166
CHARS[247] = 33;
167         Arrays.fill(CHARS, 248, 306, (byte) -19 ); // Fill 58 of value (byte) -19
168
Arrays.fill(CHARS, 306, 308, (byte) 33 ); // Fill 2 of value (byte) 33
169
Arrays.fill(CHARS, 308, 319, (byte) -19 ); // Fill 11 of value (byte) -19
170
Arrays.fill(CHARS, 319, 321, (byte) 33 ); // Fill 2 of value (byte) 33
171
Arrays.fill(CHARS, 321, 329, (byte) -19 ); // Fill 8 of value (byte) -19
172
CHARS[329] = 33;
173         Arrays.fill(CHARS, 330, 383, (byte) -19 ); // Fill 53 of value (byte) -19
174
CHARS[383] = 33;
175         Arrays.fill(CHARS, 384, 452, (byte) -19 ); // Fill 68 of value (byte) -19
176
Arrays.fill(CHARS, 452, 461, (byte) 33 ); // Fill 9 of value (byte) 33
177
Arrays.fill(CHARS, 461, 497, (byte) -19 ); // Fill 36 of value (byte) -19
178
Arrays.fill(CHARS, 497, 500, (byte) 33 ); // Fill 3 of value (byte) 33
179
Arrays.fill(CHARS, 500, 502, (byte) -19 ); // Fill 2 of value (byte) -19
180
Arrays.fill(CHARS, 502, 506, (byte) 33 ); // Fill 4 of value (byte) 33
181
Arrays.fill(CHARS, 506, 536, (byte) -19 ); // Fill 30 of value (byte) -19
182
Arrays.fill(CHARS, 536, 592, (byte) 33 ); // Fill 56 of value (byte) 33
183
Arrays.fill(CHARS, 592, 681, (byte) -19 ); // Fill 89 of value (byte) -19
184
Arrays.fill(CHARS, 681, 699, (byte) 33 ); // Fill 18 of value (byte) 33
185
Arrays.fill(CHARS, 699, 706, (byte) -19 ); // Fill 7 of value (byte) -19
186
Arrays.fill(CHARS, 706, 720, (byte) 33 ); // Fill 14 of value (byte) 33
187
Arrays.fill(CHARS, 720, 722, (byte) -87 ); // Fill 2 of value (byte) -87
188
Arrays.fill(CHARS, 722, 768, (byte) 33 ); // Fill 46 of value (byte) 33
189
Arrays.fill(CHARS, 768, 838, (byte) -87 ); // Fill 70 of value (byte) -87
190
Arrays.fill(CHARS, 838, 864, (byte) 33 ); // Fill 26 of value (byte) 33
191
Arrays.fill(CHARS, 864, 866, (byte) -87 ); // Fill 2 of value (byte) -87
192
Arrays.fill(CHARS, 866, 902, (byte) 33 ); // Fill 36 of value (byte) 33
193
CHARS[902] = -19;
194         CHARS[903] = -87;
195         Arrays.fill(CHARS, 904, 907, (byte) -19 ); // Fill 3 of value (byte) -19
196
CHARS[907] = 33;
197         CHARS[908] = -19;
198         CHARS[909] = 33;
199         Arrays.fill(CHARS, 910, 930, (byte) -19 ); // Fill 20 of value (byte) -19
200
CHARS[930] = 33;
201         Arrays.fill(CHARS, 931, 975, (byte) -19 ); // Fill 44 of value (byte) -19
202
CHARS[975] = 33;
203         Arrays.fill(CHARS, 976, 983, (byte) -19 ); // Fill 7 of value (byte) -19
204
Arrays.fill(CHARS, 983, 986, (byte) 33 ); // Fill 3 of value (byte) 33
205
CHARS[986] = -19;
206         CHARS[987] = 33;
207         CHARS[988] = -19;
208         CHARS[989] = 33;
209         CHARS[990] = -19;
210         CHARS[991] = 33;
211         CHARS[992] = -19;
212         CHARS[993] = 33;
213         Arrays.fill(CHARS, 994, 1012, (byte) -19 ); // Fill 18 of value (byte) -19
214
Arrays.fill(CHARS, 1012, 1025, (byte) 33 ); // Fill 13 of value (byte) 33
215
Arrays.fill(CHARS, 1025, 1037, (byte) -19 ); // Fill 12 of value (byte) -19
216
CHARS[1037] = 33;
217         Arrays.fill(CHARS, 1038, 1104, (byte) -19 ); // Fill 66 of value (byte) -19
218
CHARS[1104] = 33;
219         Arrays.fill(CHARS, 1105, 1117, (byte) -19 ); // Fill 12 of value (byte) -19
220
CHARS[1117] = 33;
221         Arrays.fill(CHARS, 1118, 1154, (byte) -19 ); // Fill 36 of value (byte) -19
222
CHARS[1154] = 33;
223         Arrays.fill(CHARS, 1155, 1159, (byte) -87 ); // Fill 4 of value (byte) -87
224
Arrays.fill(CHARS, 1159, 1168, (byte) 33 ); // Fill 9 of value (byte) 33
225
Arrays.fill(CHARS, 1168, 1221, (byte) -19 ); // Fill 53 of value (byte) -19
226
Arrays.fill(CHARS, 1221, 1223, (byte) 33 ); // Fill 2 of value (byte) 33
227
Arrays.fill(CHARS, 1223, 1225, (byte) -19 ); // Fill 2 of value (byte) -19
228
Arrays.fill(CHARS, 1225, 1227, (byte) 33 ); // Fill 2 of value (byte) 33
229
Arrays.fill(CHARS, 1227, 1229, (byte) -19 ); // Fill 2 of value (byte) -19
230
Arrays.fill(CHARS, 1229, 1232, (byte) 33 ); // Fill 3 of value (byte) 33
231
Arrays.fill(CHARS, 1232, 1260, (byte) -19 ); // Fill 28 of value (byte) -19
232
Arrays.fill(CHARS, 1260, 1262, (byte) 33 ); // Fill 2 of value (byte) 33
233
Arrays.fill(CHARS, 1262, 1270, (byte) -19 ); // Fill 8 of value (byte) -19
234
Arrays.fill(CHARS, 1270, 1272, (byte) 33 ); // Fill 2 of value (byte) 33
235
Arrays.fill(CHARS, 1272, 1274, (byte) -19 ); // Fill 2 of value (byte) -19
236
Arrays.fill(CHARS, 1274, 1329, (byte) 33 ); // Fill 55 of value (byte) 33
237
Arrays.fill(CHARS, 1329, 1367, (byte) -19 ); // Fill 38 of value (byte) -19
238
Arrays.fill(CHARS, 1367, 1369, (byte) 33 ); // Fill 2 of value (byte) 33
239
CHARS[1369] = -19;
240         Arrays.fill(CHARS, 1370, 1377, (byte) 33 ); // Fill 7 of value (byte) 33
241
Arrays.fill(CHARS, 1377, 1415, (byte) -19 ); // Fill 38 of value (byte) -19
242
Arrays.fill(CHARS, 1415, 1425, (byte) 33 ); // Fill 10 of value (byte) 33
243
Arrays.fill(CHARS, 1425, 1442, (byte) -87 ); // Fill 17 of value (byte) -87
244
CHARS[1442] = 33;
245         Arrays.fill(CHARS, 1443, 1466, (byte) -87 ); // Fill 23 of value (byte) -87
246
CHARS[1466] = 33;
247         Arrays.fill(CHARS, 1467, 1470, (byte) -87 ); // Fill 3 of value (byte) -87
248
CHARS[1470] = 33;
249         CHARS[1471] = -87;
250         CHARS[1472] = 33;
251         Arrays.fill(CHARS, 1473, 1475, (byte) -87 ); // Fill 2 of value (byte) -87
252
CHARS[1475] = 33;
253         CHARS[1476] = -87;
254         Arrays.fill(CHARS, 1477, 1488, (byte) 33 ); // Fill 11 of value (byte) 33
255
Arrays.fill(CHARS, 1488, 1515, (byte) -19 ); // Fill 27 of value (byte) -19
256
Arrays.fill(CHARS, 1515, 1520, (byte) 33 ); // Fill 5 of value (byte) 33
257
Arrays.fill(CHARS, 1520, 1523, (byte) -19 ); // Fill 3 of value (byte) -19
258
Arrays.fill(CHARS, 1523, 1569, (byte) 33 ); // Fill 46 of value (byte) 33
259
Arrays.fill(CHARS, 1569, 1595, (byte) -19 ); // Fill 26 of value (byte) -19
260
Arrays.fill(CHARS, 1595, 1600, (byte) 33 ); // Fill 5 of value (byte) 33
261
CHARS[1600] = -87;
262         Arrays.fill(CHARS, 1601, 1611, (byte) -19 ); // Fill 10 of value (byte) -19
263
Arrays.fill(CHARS, 1611, 1619, (byte) -87 ); // Fill 8 of value (byte) -87
264
Arrays.fill(CHARS, 1619, 1632, (byte) 33 ); // Fill 13 of value (byte) 33
265
Arrays.fill(CHARS, 1632, 1642, (byte) -87 ); // Fill 10 of value (byte) -87
266
Arrays.fill(CHARS, 1642, 1648, (byte) 33 ); // Fill 6 of value (byte) 33
267
CHARS[1648] = -87;
268         Arrays.fill(CHARS, 1649, 1720, (byte) -19 ); // Fill 71 of value (byte) -19
269
Arrays.fill(CHARS, 1720, 1722, (byte) 33 ); // Fill 2 of value (byte) 33
270
Arrays.fill(CHARS, 1722, 1727, (byte) -19 ); // Fill 5 of value (byte) -19
271
CHARS[1727] = 33;
272         Arrays.fill(CHARS, 1728, 1743, (byte) -19 ); // Fill 15 of value (byte) -19
273
CHARS[1743] = 33;
274         Arrays.fill(CHARS, 1744, 1748, (byte) -19 ); // Fill 4 of value (byte) -19
275
CHARS[1748] = 33;
276         CHARS[1749] = -19;
277         Arrays.fill(CHARS, 1750, 1765, (byte) -87 ); // Fill 15 of value (byte) -87
278
Arrays.fill(CHARS, 1765, 1767, (byte) -19 ); // Fill 2 of value (byte) -19
279
Arrays.fill(CHARS, 1767, 1769, (byte) -87 ); // Fill 2 of value (byte) -87
280
CHARS[1769] = 33;
281         Arrays.fill(CHARS, 1770, 1774, (byte) -87 ); // Fill 4 of value (byte) -87
282
Arrays.fill(CHARS, 1774, 1776, (byte) 33 ); // Fill 2 of value (byte) 33
283
Arrays.fill(CHARS, 1776, 1786, (byte) -87 ); // Fill 10 of value (byte) -87
284
Arrays.fill(CHARS, 1786, 2305, (byte) 33 ); // Fill 519 of value (byte) 33
285
Arrays.fill(CHARS, 2305, 2308, (byte) -87 ); // Fill 3 of value (byte) -87
286
CHARS[2308] = 33;
287         Arrays.fill(CHARS, 2309, 2362, (byte) -19 ); // Fill 53 of value (byte) -19
288
Arrays.fill(CHARS, 2362, 2364, (byte) 33 ); // Fill 2 of value (byte) 33
289
CHARS[2364] = -87;
290         CHARS[2365] = -19;
291         Arrays.fill(CHARS, 2366, 2382, (byte) -87 ); // Fill 16 of value (byte) -87
292
Arrays.fill(CHARS, 2382, 2385, (byte) 33 ); // Fill 3 of value (byte) 33
293
Arrays.fill(CHARS, 2385, 2389, (byte) -87 ); // Fill 4 of value (byte) -87
294
Arrays.fill(CHARS, 2389, 2392, (byte) 33 ); // Fill 3 of value (byte) 33
295
Arrays.fill(CHARS, 2392, 2402, (byte) -19 ); // Fill 10 of value (byte) -19
296
Arrays.fill(CHARS, 2402, 2404, (byte) -87 ); // Fill 2 of value (byte) -87
297
Arrays.fill(CHARS, 2404, 2406, (byte) 33 ); // Fill 2 of value (byte) 33
298
Arrays.fill(CHARS, 2406, 2416, (byte) -87 ); // Fill 10 of value (byte) -87
299
Arrays.fill(CHARS, 2416, 2433, (byte) 33 ); // Fill 17 of value (byte) 33
300
Arrays.fill(CHARS, 2433, 2436, (byte) -87 ); // Fill 3 of value (byte) -87
301
CHARS[2436] = 33;
302         Arrays.fill(CHARS, 2437, 2445, (byte) -19 ); // Fill 8 of value (byte) -19
303
Arrays.fill(CHARS, 2445, 2447, (byte) 33 ); // Fill 2 of value (byte) 33
304
Arrays.fill(CHARS, 2447, 2449, (byte) -19 ); // Fill 2 of value (byte) -19
305
Arrays.fill(CHARS, 2449, 2451, (byte) 33 ); // Fill 2 of value (byte) 33
306
Arrays.fill(CHARS, 2451, 2473, (byte) -19 ); // Fill 22 of value (byte) -19
307
CHARS[2473] = 33;
308         Arrays.fill(CHARS, 2474, 2481, (byte) -19 ); // Fill 7 of value (byte) -19
309
CHARS[2481] = 33;
310         CHARS[2482] = -19;
311         Arrays.fill(CHARS, 2483, 2486, (byte) 33 ); // Fill 3 of value (byte) 33
312
Arrays.fill(CHARS, 2486, 2490, (byte) -19 ); // Fill 4 of value (byte) -19
313
Arrays.fill(CHARS, 2490, 2492, (byte) 33 ); // Fill 2 of value (byte) 33
314
CHARS[2492] = -87;
315         CHARS[2493] = 33;
316         Arrays.fill(CHARS, 2494, 2501, (byte) -87 ); // Fill 7 of value (byte) -87
317
Arrays.fill(CHARS, 2501, 2503, (byte) 33 ); // Fill 2 of value (byte) 33
318
Arrays.fill(CHARS, 2503, 2505, (byte) -87 ); // Fill 2 of value (byte) -87
319
Arrays.fill(CHARS, 2505, 2507, (byte) 33 ); // Fill 2 of value (byte) 33
320
Arrays.fill(CHARS, 2507, 2510, (byte) -87 ); // Fill 3 of value (byte) -87
321
Arrays.fill(CHARS, 2510, 2519, (byte) 33 ); // Fill 9 of value (byte) 33
322
CHARS[2519] = -87;
323         Arrays.fill(CHARS, 2520, 2524, (byte) 33 ); // Fill 4 of value (byte) 33
324
Arrays.fill(CHARS, 2524, 2526, (byte) -19 ); // Fill 2 of value (byte) -19
325
CHARS[2526] = 33;
326         Arrays.fill(CHARS, 2527, 2530, (byte) -19 ); // Fill 3 of value (byte) -19
327
Arrays.fill(CHARS, 2530, 2532, (byte) -87 ); // Fill 2 of value (byte) -87
328
Arrays.fill(CHARS, 2532, 2534, (byte) 33 ); // Fill 2 of value (byte) 33
329
Arrays.fill(CHARS, 2534, 2544, (byte) -87 ); // Fill 10 of value (byte) -87
330
Arrays.fill(CHARS, 2544, 2546, (byte) -19 ); // Fill 2 of value (byte) -19
331
Arrays.fill(CHARS, 2546, 2562, (byte) 33 ); // Fill 16 of value (byte) 33
332
CHARS[2562] = -87;
333         Arrays.fill(CHARS, 2563, 2565, (byte) 33 ); // Fill 2 of value (byte) 33
334
Arrays.fill(CHARS, 2565, 2571, (byte) -19 ); // Fill 6 of value (byte) -19
335
Arrays.fill(CHARS, 2571, 2575, (byte) 33 ); // Fill 4 of value (byte) 33
336
Arrays.fill(CHARS, 2575, 2577, (byte) -19 ); // Fill 2 of value (byte) -19
337
Arrays.fill(CHARS, 2577, 2579, (byte) 33 ); // Fill 2 of value (byte) 33
338
Arrays.fill(CHARS, 2579, 2601, (byte) -19 ); // Fill 22 of value (byte) -19
339
CHARS[2601] = 33;
340         Arrays.fill(CHARS, 2602, 2609, (byte) -19 ); // Fill 7 of value (byte) -19
341
CHARS[2609] = 33;
342         Arrays.fill(CHARS, 2610, 2612, (byte) -19 ); // Fill 2 of value (byte) -19
343
CHARS[2612] = 33;
344         Arrays.fill(CHARS, 2613, 2615, (byte) -19 ); // Fill 2 of value (byte) -19
345
CHARS[2615] = 33;
346         Arrays.fill(CHARS, 2616, 2618, (byte) -19 ); // Fill 2 of value (byte) -19
347
Arrays.fill(CHARS, 2618, 2620, (byte) 33 ); // Fill 2 of value (byte) 33
348
CHARS[2620] = -87;
349         CHARS[2621] = 33;
350         Arrays.fill(CHARS, 2622, 2627, (byte) -87 ); // Fill 5 of value (byte) -87
351
Arrays.fill(CHARS, 2627, 2631, (byte) 33 ); // Fill 4 of value (byte) 33
352
Arrays.fill(CHARS, 2631, 2633, (byte) -87 ); // Fill 2 of value (byte) -87
353
Arrays.fill(CHARS, 2633, 2635, (byte) 33 ); // Fill 2 of value (byte) 33
354
Arrays.fill(CHARS, 2635, 2638, (byte) -87 ); // Fill 3 of value (byte) -87
355
Arrays.fill(CHARS, 2638, 2649, (byte) 33 ); // Fill 11 of value (byte) 33
356
Arrays.fill(CHARS, 2649, 2653, (byte) -19 ); // Fill 4 of value (byte) -19
357
CHARS[2653] = 33;
358         CHARS[2654] = -19;
359         Arrays.fill(CHARS, 2655, 2662, (byte) 33 ); // Fill 7 of value (byte) 33
360
Arrays.fill(CHARS, 2662, 2674, (byte) -87 ); // Fill 12 of value (byte) -87
361
Arrays.fill(CHARS, 2674, 2677, (byte) -19 ); // Fill 3 of value (byte) -19
362
Arrays.fill(CHARS, 2677, 2689, (byte) 33 ); // Fill 12 of value (byte) 33
363
Arrays.fill(CHARS, 2689, 2692, (byte) -87 ); // Fill 3 of value (byte) -87
364
CHARS[2692] = 33;
365         Arrays.fill(CHARS, 2693, 2700, (byte) -19 ); // Fill 7 of value (byte) -19
366
CHARS[2700] = 33;
367         CHARS[2701] = -19;
368         CHARS[2702] = 33;
369         Arrays.fill(CHARS, 2703, 2706, (byte) -19 ); // Fill 3 of value (byte) -19
370
CHARS[2706] = 33;
371         Arrays.fill(CHARS, 2707, 2729, (byte) -19 ); // Fill 22 of value (byte) -19
372
CHARS[2729] = 33;
373         Arrays.fill(CHARS, 2730, 2737, (byte) -19 ); // Fill 7 of value (byte) -19
374
CHARS[2737] = 33;
375         Arrays.fill(CHARS, 2738, 2740, (byte) -19 ); // Fill 2 of value (byte) -19
376
CHARS[2740] = 33;
377         Arrays.fill(CHARS, 2741, 2746, (byte) -19 ); // Fill 5 of value (byte) -19
378
Arrays.fill(CHARS, 2746, 2748, (byte) 33 ); // Fill 2 of value (byte) 33
379
CHARS[2748] = -87;
380         CHARS[2749] = -19;
381         Arrays.fill(CHARS, 2750, 2758, (byte) -87 ); // Fill 8 of value (byte) -87
382
CHARS[2758] = 33;
383         Arrays.fill(CHARS, 2759, 2762, (byte) -87 ); // Fill 3 of value (byte) -87
384
CHARS[2762] = 33;
385         Arrays.fill(CHARS, 2763, 2766, (byte) -87 ); // Fill 3 of value (byte) -87
386
Arrays.fill(CHARS, 2766, 2784, (byte) 33 ); // Fill 18 of value (byte) 33
387
CHARS[2784] = -19;
388         Arrays.fill(CHARS, 2785, 2790, (byte) 33 ); // Fill 5 of value (byte) 33
389
Arrays.fill(CHARS, 2790, 2800, (byte) -87 ); // Fill 10 of value (byte) -87
390
Arrays.fill(CHARS, 2800, 2817, (byte) 33 ); // Fill 17 of value (byte) 33
391
Arrays.fill(CHARS, 2817, 2820, (byte) -87 ); // Fill 3 of value (byte) -87
392
CHARS[2820] = 33;
393         Arrays.fill(CHARS, 2821, 2829, (byte) -19 ); // Fill 8 of value (byte) -19
394
Arrays.fill(CHARS, 2829, 2831, (byte) 33 ); // Fill 2 of value (byte) 33
395
Arrays.fill(CHARS, 2831, 2833, (byte) -19 ); // Fill 2 of value (byte) -19
396
Arrays.fill(CHARS, 2833, 2835, (byte) 33 ); // Fill 2 of value (byte) 33
397
Arrays.fill(CHARS, 2835, 2857, (byte) -19 ); // Fill 22 of value (byte) -19
398
CHARS[2857] = 33;
399         Arrays.fill(CHARS, 2858, 2865, (byte) -19 ); // Fill 7 of value (byte) -19
400
CHARS[2865] = 33;
401         Arrays.fill(CHARS, 2866, 2868, (byte) -19 ); // Fill 2 of value (byte) -19
402
Arrays.fill(CHARS, 2868, 2870, (byte) 33 ); // Fill 2 of value (byte) 33
403
Arrays.fill(CHARS, 2870, 2874, (byte) -19 ); // Fill 4 of value (byte) -19
404
Arrays.fill(CHARS, 2874, 2876, (byte) 33 ); // Fill 2 of value (byte) 33
405
CHARS[2876] = -87;
406         CHARS[2877] = -19;
407         Arrays.fill(CHARS, 2878, 2884, (byte) -87 ); // Fill 6 of value (byte) -87
408
Arrays.fill(CHARS, 2884, 2887, (byte) 33 ); // Fill 3 of value (byte) 33
409
Arrays.fill(CHARS, 2887, 2889, (byte) -87 ); // Fill 2 of value (byte) -87
410
Arrays.fill(CHARS, 2889, 2891, (byte) 33 ); // Fill 2 of value (byte) 33
411
Arrays.fill(CHARS, 2891, 2894, (byte) -87 ); // Fill 3 of value (byte) -87
412
Arrays.fill(CHARS, 2894, 2902, (byte) 33 ); // Fill 8 of value (byte) 33
413
Arrays.fill(CHARS, 2902, 2904, (byte) -87 ); // Fill 2 of value (byte) -87
414
Arrays.fill(CHARS, 2904, 2908, (byte) 33 ); // Fill 4 of value (byte) 33
415
Arrays.fill(CHARS, 2908, 2910, (byte) -19 ); // Fill 2 of value (byte) -19
416
CHARS[2910] = 33;
417         Arrays.fill(CHARS, 2911, 2914, (byte) -19 ); // Fill 3 of value (byte) -19
418
Arrays.fill(CHARS, 2914, 2918, (byte) 33 ); // Fill 4 of value (byte) 33
419
Arrays.fill(CHARS, 2918, 2928, (byte) -87 ); // Fill 10 of value (byte) -87
420
Arrays.fill(CHARS, 2928, 2946, (byte) 33 ); // Fill 18 of value (byte) 33
421
Arrays.fill(CHARS, 2946, 2948, (byte) -87 ); // Fill 2 of value (byte) -87
422
CHARS[2948] = 33;
423         Arrays.fill(CHARS, 2949, 2955, (byte) -19 ); // Fill 6 of value (byte) -19
424
Arrays.fill(CHARS, 2955, 2958, (byte) 33 ); // Fill 3 of value (byte) 33
425
Arrays.fill(CHARS, 2958, 2961, (byte) -19 ); // Fill 3 of value (byte) -19
426
CHARS[2961] = 33;
427         Arrays.fill(CHARS, 2962, 2966, (byte) -19 ); // Fill 4 of value (byte) -19
428
Arrays.fill(CHARS, 2966, 2969, (byte) 33 ); // Fill 3 of value (byte) 33
429
Arrays.fill(CHARS, 2969, 2971, (byte) -19 ); // Fill 2 of value (byte) -19
430
CHARS[2971] = 33;
431         CHARS[2972] = -19;
432         CHARS[2973] = 33;
433         Arrays.fill(CHARS, 2974, 2976, (byte) -19 ); // Fill 2 of value (byte) -19
434
Arrays.fill(CHARS, 2976, 2979, (byte) 33 ); // Fill 3 of value (byte) 33
435
Arrays.fill(CHARS, 2979, 2981, (byte) -19 ); // Fill 2 of value (byte) -19
436
Arrays.fill(CHARS, 2981, 2984, (byte) 33 ); // Fill 3 of value (byte) 33
437
Arrays.fill(CHARS, 2984, 2987, (byte) -19 ); // Fill 3 of value (byte) -19
438
Arrays.fill(CHARS, 2987, 2990, (byte) 33 ); // Fill 3 of value (byte) 33
439
Arrays.fill(CHARS, 2990, 2998, (byte) -19 ); // Fill 8 of value (byte) -19
440
CHARS[2998] = 33;
441         Arrays.fill(CHARS, 2999, 3002, (byte) -19 ); // Fill 3 of value (byte) -19
442
Arrays.fill(CHARS, 3002, 3006, (byte) 33 ); // Fill 4 of value (byte) 33
443
Arrays.fill(CHARS, 3006, 3011, (byte) -87 ); // Fill 5 of value (byte) -87
444
Arrays.fill(CHARS, 3011, 3014, (byte) 33 ); // Fill 3 of value (byte) 33
445
Arrays.fill(CHARS, 3014, 3017, (byte) -87 ); // Fill 3 of value (byte) -87
446
CHARS[3017] = 33;
447         Arrays.fill(CHARS, 3018, 3022, (byte) -87 ); // Fill 4 of value (byte) -87
448
Arrays.fill(CHARS, 3022, 3031, (byte) 33 ); // Fill 9 of value (byte) 33
449
CHARS[3031] = -87;
450         Arrays.fill(CHARS, 3032, 3047, (byte) 33 ); // Fill 15 of value (byte) 33
451
Arrays.fill(CHARS, 3047, 3056, (byte) -87 ); // Fill 9 of value (byte) -87
452
Arrays.fill(CHARS, 3056, 3073, (byte) 33 ); // Fill 17 of value (byte) 33
453
Arrays.fill(CHARS, 3073, 3076, (byte) -87 ); // Fill 3 of value (byte) -87
454
CHARS[3076] = 33;
455         Arrays.fill(CHARS, 3077, 3085, (byte) -19 ); // Fill 8 of value (byte) -19
456
CHARS[3085] = 33;
457         Arrays.fill(CHARS, 3086, 3089, (byte) -19 ); // Fill 3 of value (byte) -19
458
CHARS[3089] = 33;
459         Arrays.fill(CHARS, 3090, 3113, (byte) -19 ); // Fill 23 of value (byte) -19
460
CHARS[3113] = 33;
461         Arrays.fill(CHARS, 3114, 3124, (byte) -19 ); // Fill 10 of value (byte) -19
462
CHARS[3124] = 33;
463         Arrays.fill(CHARS, 3125, 3130, (byte) -19 ); // Fill 5 of value (byte) -19
464
Arrays.fill(CHARS, 3130, 3134, (byte) 33 ); // Fill 4 of value (byte) 33
465
Arrays.fill(CHARS, 3134, 3141, (byte) -87 ); // Fill 7 of value (byte) -87
466
CHARS[3141] = 33;
467         Arrays.fill(CHARS, 3142, 3145, (byte) -87 ); // Fill 3 of value (byte) -87
468
CHARS[3145] = 33;
469         Arrays.fill(CHARS, 3146, 3150, (byte) -87 ); // Fill 4 of value (byte) -87
470
Arrays.fill(CHARS, 3150, 3157, (byte) 33 ); // Fill 7 of value (byte) 33
471
Arrays.fill(CHARS, 3157, 3159, (byte) -87 ); // Fill 2 of value (byte) -87
472
Arrays.fill(CHARS, 3159, 3168, (byte) 33 ); // Fill 9 of value (byte) 33
473
Arrays.fill(CHARS, 3168, 3170, (byte) -19 ); // Fill 2 of value (byte) -19
474
Arrays.fill(CHARS, 3170, 3174, (byte) 33 ); // Fill 4 of value (byte) 33
475
Arrays.fill(CHARS, 3174, 3184, (byte) -87 ); // Fill 10 of value (byte) -87
476
Arrays.fill(CHARS, 3184, 3202, (byte) 33 ); // Fill 18 of value (byte) 33
477
Arrays.fill(CHARS, 3202, 3204, (byte) -87 ); // Fill 2 of value (byte) -87
478
CHARS[3204] = 33;
479         Arrays.fill(CHARS, 3205, 3213, (byte) -19 ); // Fill 8 of value (byte) -19
480
CHARS[3213] = 33;
481         Arrays.fill(CHARS, 3214, 3217, (byte) -19 ); // Fill 3 of value (byte) -19
482
CHARS[3217] = 33;
483         Arrays.fill(CHARS, 3218, 3241, (byte) -19 ); // Fill 23 of value (byte) -19
484
CHARS[3241] = 33;
485         Arrays.fill(CHARS, 3242, 3252, (byte) -19 ); // Fill 10 of value (byte) -19
486
CHARS[3252] = 33;
487         Arrays.fill(CHARS, 3253, 3258, (byte) -19 ); // Fill 5 of value (byte) -19
488
Arrays.fill(CHARS, 3258, 3262, (byte) 33 ); // Fill 4 of value (byte) 33
489
Arrays.fill(CHARS, 3262, 3269, (byte) -87 ); // Fill 7 of value (byte) -87
490
CHARS[3269] = 33;
491         Arrays.fill(CHARS, 3270, 3273, (byte) -87 ); // Fill 3 of value (byte) -87
492
CHARS[3273] = 33;
493         Arrays.fill(CHARS, 3274, 3278, (byte) -87 ); // Fill 4 of value (byte) -87
494
Arrays.fill(CHARS, 3278, 3285, (byte) 33 ); // Fill 7 of value (byte) 33
495
Arrays.fill(CHARS, 3285, 3287, (byte) -87 ); // Fill 2 of value (byte) -87
496
Arrays.fill(CHARS, 3287, 3294, (byte) 33 ); // Fill 7 of value (byte) 33
497
CHARS[3294] = -19;
498         CHARS[3295] = 33;
499         Arrays.fill(CHARS, 3296, 3298, (byte) -19 ); // Fill 2 of value (byte) -19
500
Arrays.fill(CHARS, 3298, 3302, (byte) 33 ); // Fill 4 of value (byte) 33
501
Arrays.fill(CHARS, 3302, 3312, (byte) -87 ); // Fill 10 of value (byte) -87
502
Arrays.fill(CHARS, 3312, 3330, (byte) 33 ); // Fill 18 of value (byte) 33
503
Arrays.fill(CHARS, 3330, 3332, (byte) -87 ); // Fill 2 of value (byte) -87
504
CHARS[3332] = 33;
505         Arrays.fill(CHARS, 3333, 3341, (byte) -19 ); // Fill 8 of value (byte) -19
506
CHARS[3341] = 33;
507         Arrays.fill(CHARS, 3342, 3345, (byte) -19 ); // Fill 3 of value (byte) -19
508
CHARS[3345] = 33;
509         Arrays.fill(CHARS, 3346, 3369, (byte) -19 ); // Fill 23 of value (byte) -19
510
CHARS[3369] = 33;
511         Arrays.fill(CHARS, 3370, 3386, (byte) -19 ); // Fill 16 of value (byte) -19
512
Arrays.fill(CHARS, 3386, 3390, (byte) 33 ); // Fill 4 of value (byte) 33
513
Arrays.fill(CHARS, 3390, 3396, (byte) -87 ); // Fill 6 of value (byte) -87
514
Arrays.fill(CHARS, 3396, 3398, (byte) 33 ); // Fill 2 of value (byte) 33
515
Arrays.fill(CHARS, 3398, 3401, (byte) -87 ); // Fill 3 of value (byte) -87
516
CHARS[3401] = 33;
517         Arrays.fill(CHARS, 3402, 3406, (byte) -87 ); // Fill 4 of value (byte) -87
518
Arrays.fill(CHARS, 3406, 3415, (byte) 33 ); // Fill 9 of value (byte) 33
519
CHARS[3415] = -87;
520         Arrays.fill(CHARS, 3416, 3424, (byte) 33 ); // Fill 8 of value (byte) 33
521
Arrays.fill(CHARS, 3424, 3426, (byte) -19 ); // Fill 2 of value (byte) -19
522
Arrays.fill(CHARS, 3426, 3430, (byte) 33 ); // Fill 4 of value (byte) 33
523
Arrays.fill(CHARS, 3430, 3440, (byte) -87 ); // Fill 10 of value (byte) -87
524
Arrays.fill(CHARS, 3440, 3585, (byte) 33 ); // Fill 145 of value (byte) 33
525
Arrays.fill(CHARS, 3585, 3631, (byte) -19 ); // Fill 46 of value (byte) -19
526
CHARS[3631] = 33;
527         CHARS[3632] = -19;
528         CHARS[3633] = -87;
529         Arrays.fill(CHARS, 3634, 3636, (byte) -19 ); // Fill 2 of value (byte) -19
530
Arrays.fill(CHARS, 3636, 3643, (byte) -87 ); // Fill 7 of value (byte) -87
531
Arrays.fill(CHARS, 3643, 3648, (byte) 33 ); // Fill 5 of value (byte) 33
532
Arrays.fill(CHARS, 3648, 3654, (byte) -19 ); // Fill 6 of value (byte) -19
533
Arrays.fill(CHARS, 3654, 3663, (byte) -87 ); // Fill 9 of value (byte) -87
534
CHARS[3663] = 33;
535         Arrays.fill(CHARS, 3664, 3674, (byte) -87 ); // Fill 10 of value (byte) -87
536
Arrays.fill(CHARS, 3674, 3713, (byte) 33 ); // Fill 39 of value (byte) 33
537
Arrays.fill(CHARS, 3713, 3715, (byte) -19 ); // Fill 2 of value (byte) -19
538
CHARS[3715] = 33;
539         CHARS[3716] = -19;
540         Arrays.fill(CHARS, 3717, 3719, (byte) 33 ); // Fill 2 of value (byte) 33
541
Arrays.fill(CHARS, 3719, 3721, (byte) -19 ); // Fill 2 of value (byte) -19
542
CHARS[3721] = 33;
543         CHARS[3722] = -19;
544         Arrays.fill(CHARS, 3723, 3725, (byte) 33 ); // Fill 2 of value (byte) 33
545
CHARS[3725] = -19;
546         Arrays.fill(CHARS, 3726, 3732, (byte) 33 ); // Fill 6 of value (byte) 33
547
Arrays.fill(CHARS, 3732, 3736, (byte) -19 ); // Fill 4 of value (byte) -19
548
CHARS[3736] = 33;
549         Arrays.fill(CHARS, 3737, 3744, (byte) -19 ); // Fill 7 of value (byte) -19
550
CHARS[3744] = 33;
551         Arrays.fill(CHARS, 3745, 3748, (byte) -19 ); // Fill 3 of value (byte) -19
552
CHARS[3748] = 33;
553         CHARS[3749] = -19;
554         CHARS[3750] = 33;
555         CHARS[3751] = -19;
556         Arrays.fill(CHARS, 3752, 3754, (byte) 33 ); // Fill 2 of value (byte) 33
557
Arrays.fill(CHARS, 3754, 3756, (byte) -19 ); // Fill 2 of value (byte) -19
558
CHARS[3756] = 33;
559         Arrays.fill(CHARS, 3757, 3759, (byte) -19 ); // Fill 2 of value (byte) -19
560
CHARS[3759] = 33;
561         CHARS[3760] = -19;
562         CHARS[3761] = -87;
563         Arrays.fill(CHARS, 3762, 3764, (byte) -19 ); // Fill 2 of value (byte) -19
564
Arrays.fill(CHARS, 3764, 3770, (byte) -87 ); // Fill 6 of value (byte) -87
565
CHARS[3770] = 33;
566         Arrays.fill(CHARS, 3771, 3773, (byte) -87 ); // Fill 2 of value (byte) -87
567
CHARS[3773] = -19;
568         Arrays.fill(CHARS, 3774, 3776, (byte) 33 ); // Fill 2 of value (byte) 33
569
Arrays.fill(CHARS, 3776, 3781, (byte) -19 ); // Fill 5 of value (byte) -19
570
CHARS[3781] = 33;
571         CHARS[3782] = -87;
572         CHARS[3783] = 33;
573         Arrays.fill(CHARS, 3784, 3790, (byte) -87 ); // Fill 6 of value (byte) -87
574
Arrays.fill(CHARS, 3790, 3792, (byte) 33 ); // Fill 2 of value (byte) 33
575
Arrays.fill(CHARS, 3792, 3802, (byte) -87 ); // Fill 10 of value (byte) -87
576
Arrays.fill(CHARS, 3802, 3864, (byte) 33 ); // Fill 62 of value (byte) 33
577
Arrays.fill(CHARS, 3864, 3866, (byte) -87 ); // Fill 2 of value (byte) -87
578
Arrays.fill(CHARS, 3866, 3872, (byte) 33 ); // Fill 6 of value (byte) 33
579
Arrays.fill(CHARS, 3872, 3882, (byte) -87 ); // Fill 10 of value (byte) -87
580
Arrays.fill(CHARS, 3882, 3893, (byte) 33 ); // Fill 11 of value (byte) 33
581
CHARS[3893] = -87;
582         CHARS[3894] = 33;
583         CHARS[3895] = -87;
584         CHARS[3896] = 33;
585         CHARS[3897] = -87;
586         Arrays.fill(CHARS, 3898, 3902, (byte) 33 ); // Fill 4 of value (byte) 33
587
Arrays.fill(CHARS, 3902, 3904, (byte) -87 ); // Fill 2 of value (byte) -87
588
Arrays.fill(CHARS, 3904, 3912, (byte) -19 ); // Fill 8 of value (byte) -19
589
CHARS[3912] = 33;
590         Arrays.fill(CHARS, 3913, 3946, (byte) -19 ); // Fill 33 of value (byte) -19
591
Arrays.fill(CHARS, 3946, 3953, (byte) 33 ); // Fill 7 of value (byte) 33
592
Arrays.fill(CHARS, 3953, 3973, (byte) -87 ); // Fill 20 of value (byte) -87
593
CHARS[3973] = 33;
594         Arrays.fill(CHARS, 3974, 3980, (byte) -87 ); // Fill 6 of value (byte) -87
595
Arrays.fill(CHARS, 3980, 3984, (byte) 33 ); // Fill 4 of value (byte) 33
596
Arrays.fill(CHARS, 3984, 3990, (byte) -87 ); // Fill 6 of value (byte) -87
597
CHARS[3990] = 33;
598         CHARS[3991] = -87;
599         CHARS[3992] = 33;
600         Arrays.fill(CHARS, 3993, 4014, (byte) -87 ); // Fill 21 of value (byte) -87
601
Arrays.fill(CHARS, 4014, 4017, (byte) 33 ); // Fill 3 of value (byte) 33
602
Arrays.fill(CHARS, 4017, 4024, (byte) -87 ); // Fill 7 of value (byte) -87
603
CHARS[4024] = 33;
604         CHARS[4025] = -87;
605         Arrays.fill(CHARS, 4026, 4256, (byte) 33 ); // Fill 230 of value (byte) 33
606
Arrays.fill(CHARS, 4256, 4294, (byte) -19 ); // Fill 38 of value (byte) -19
607
Arrays.fill(CHARS, 4294, 4304, (byte) 33 ); // Fill 10 of value (byte) 33
608
Arrays.fill(CHARS, 4304, 4343, (byte) -19 ); // Fill 39 of value (byte) -19
609
Arrays.fill(CHARS, 4343, 4352, (byte) 33 ); // Fill 9 of value (byte) 33
610
CHARS[4352] = -19;
611         CHARS[4353] = 33;
612         Arrays.fill(CHARS, 4354, 4356, (byte) -19 ); // Fill 2 of value (byte) -19
613
CHARS[4356] = 33;
614         Arrays.fill(CHARS, 4357, 4360, (byte) -19 ); // Fill 3 of value (byte) -19
615
CHARS[4360] = 33;
616         CHARS[4361] = -19;
617         CHARS[4362] = 33;
618         Arrays.fill(CHARS, 4363, 4365, (byte) -19 ); // Fill 2 of value (byte) -19
619
CHARS[4365] = 33;
620         Arrays.fill(CHARS, 4366, 4371, (byte) -19 ); // Fill 5 of value (byte) -19
621
Arrays.fill(CHARS, 4371, 4412, (byte) 33 ); // Fill 41 of value (byte) 33
622
CHARS[4412] = -19;
623         CHARS[4413] = 33;
624         CHARS[4414] = -19;
625         CHARS[4415] = 33;
626         CHARS[4416] = -19;
627         Arrays.fill(CHARS, 4417, 4428, (byte) 33 ); // Fill 11 of value (byte) 33
628
CHARS[4428] = -19;
629         CHARS[4429] = 33;
630         CHARS[4430] = -19;
631         CHARS[4431] = 33;
632         CHARS[4432] = -19;
633         Arrays.fill(CHARS, 4433, 4436, (byte) 33 ); // Fill 3 of value (byte) 33
634
Arrays.fill(CHARS, 4436, 4438, (byte) -19 ); // Fill 2 of value (byte) -19
635
Arrays.fill(CHARS, 4438, 4441, (byte) 33 ); // Fill 3 of value (byte) 33
636
CHARS[4441] = -19;
637         Arrays.fill(CHARS, 4442, 4447, (byte) 33 ); // Fill 5 of value (byte) 33
638
Arrays.fill(CHARS, 4447, 4450, (byte) -19 ); // Fill 3 of value (byte) -19
639
CHARS[4450] = 33;
640         CHARS[4451] = -19;
641         CHARS[4452] = 33;
642         CHARS[4453] = -19;
643         CHARS[4454] = 33;
644         CHARS[4455] = -19;
645         CHARS[4456] = 33;
646         CHARS[4457] = -19;
647         Arrays.fill(CHARS, 4458, 4461, (byte) 33 ); // Fill 3 of value (byte) 33
648
Arrays.fill(CHARS, 4461, 4463, (byte) -19 ); // Fill 2 of value (byte) -19
649
Arrays.fill(CHARS, 4463, 4466, (byte) 33 ); // Fill 3 of value (byte) 33
650
Arrays.fill(CHARS, 4466, 4468, (byte) -19 ); // Fill 2 of value (byte) -19
651
CHARS[4468] = 33;
652         CHARS[4469] = -19;
653         Arrays.fill(CHARS, 4470, 4510, (byte) 33 ); // Fill 40 of value (byte) 33
654
CHARS[4510] = -19;
655         Arrays.fill(CHARS, 4511, 4520, (byte) 33 ); // Fill 9 of value (byte) 33
656
CHARS[4520] = -19;
657         Arrays.fill(CHARS, 4521, 4523, (byte) 33 ); // Fill 2 of value (byte) 33
658
CHARS[4523] = -19;
659         Arrays.fill(CHARS, 4524, 4526, (byte) 33 ); // Fill 2 of value (byte) 33
660
Arrays.fill(CHARS, 4526, 4528, (byte) -19 ); // Fill 2 of value (byte) -19
661
Arrays.fill(CHARS, 4528, 4535, (byte) 33 ); // Fill 7 of value (byte) 33
662
Arrays.fill(CHARS, 4535, 4537, (byte) -19 ); // Fill 2 of value (byte) -19
663
CHARS[4537] = 33;
664         CHARS[4538] = -19;
665         CHARS[4539] = 33;
666         Arrays.fill(CHARS, 4540, 4547, (byte) -19 ); // Fill 7 of value (byte) -19
667
Arrays.fill(CHARS, 4547, 4587, (byte) 33 ); // Fill 40 of value (byte) 33
668
CHARS[4587] = -19;
669         Arrays.fill(CHARS, 4588, 4592, (byte) 33 ); // Fill 4 of value (byte) 33
670
CHARS[4592] = -19;
671         Arrays.fill(CHARS, 4593, 4601, (byte) 33 ); // Fill 8 of value (byte) 33
672
CHARS[4601] = -19;
673         Arrays.fill(CHARS, 4602, 7680, (byte) 33 ); // Fill 3078 of value (byte) 33
674
Arrays.fill(CHARS, 7680, 7836, (byte) -19 ); // Fill 156 of value (byte) -19
675
Arrays.fill(CHARS, 7836, 7840, (byte) 33 ); // Fill 4 of value (byte) 33
676
Arrays.fill(CHARS, 7840, 7930, (byte) -19 ); // Fill 90 of value (byte) -19
677
Arrays.fill(CHARS, 7930, 7936, (byte) 33 ); // Fill 6 of value (byte) 33
678
Arrays.fill(CHARS, 7936, 7958, (byte) -19 ); // Fill 22 of value (byte) -19
679
Arrays.fill(CHARS, 7958, 7960, (byte) 33 ); // Fill 2 of value (byte) 33
680
Arrays.fill(CHARS, 7960, 7966, (byte) -19 ); // Fill 6 of value (byte) -19
681
Arrays.fill(CHARS, 7966, 7968, (byte) 33 ); // Fill 2 of value (byte) 33
682
Arrays.fill(CHARS, 7968, 8006, (byte) -19 ); // Fill 38 of value (byte) -19
683
Arrays.fill(CHARS, 8006, 8008, (byte) 33 ); // Fill 2 of value (byte) 33
684
Arrays.fill(CHARS, 8008, 8014, (byte) -19 ); // Fill 6 of value (byte) -19
685
Arrays.fill(CHARS, 8014, 8016, (byte) 33 ); // Fill 2 of value (byte) 33
686
Arrays.fill(CHARS, 8016, 8024, (byte) -19 ); // Fill 8 of value (byte) -19
687
CHARS[8024] = 33;
688         CHARS[8025] = -19;
689         CHARS[8026] = 33;
690         CHARS[8027] = -19;
691         CHARS[8028] = 33;
692         CHARS[8029] = -19;
693         CHARS[8030] = 33;
694         Arrays.fill(CHARS, 8031, 8062, (byte) -19 ); // Fill 31 of value (byte) -19
695
Arrays.fill(CHARS, 8062, 8064, (byte) 33 ); // Fill 2 of value (byte) 33
696
Arrays.fill(CHARS, 8064, 8117, (byte) -19 ); // Fill 53 of value (byte) -19
697
CHARS[8117] = 33;
698         Arrays.fill(CHARS, 8118, 8125, (byte) -19 ); // Fill 7 of value (byte) -19
699
CHARS[8125] = 33;
700         CHARS[8126] = -19;
701         Arrays.fill(CHARS, 8127, 8130, (byte) 33 ); // Fill 3 of value (byte) 33
702
Arrays.fill(CHARS, 8130, 8133, (byte) -19 ); // Fill 3 of value (byte) -19
703
CHARS[8133] = 33;
704         Arrays.fill(CHARS, 8134, 8141, (byte) -19 ); // Fill 7 of value (byte) -19
705
Arrays.fill(CHARS, 8141, 8144, (byte) 33 ); // Fill 3 of value (byte) 33
706
Arrays.fill(CHARS, 8144, 8148, (byte) -19 ); // Fill 4 of value (byte) -19
707
Arrays.fill(CHARS, 8148, 8150, (byte) 33 ); // Fill 2 of value (byte) 33
708
Arrays.fill(CHARS, 8150, 8156, (byte) -19 ); // Fill 6 of value (byte) -19
709
Arrays.fill(CHARS, 8156, 8160, (byte) 33 ); // Fill 4 of value (byte) 33
710
Arrays.fill(CHARS, 8160, 8173, (byte) -19 ); // Fill 13 of value (byte) -19
711
Arrays.fill(CHARS, 8173, 8178, (byte) 33 ); // Fill 5 of value (byte) 33
712
Arrays.fill(CHARS, 8178, 8181, (byte) -19 ); // Fill 3 of value (byte) -19
713
CHARS[8181] = 33;
714         Arrays.fill(CHARS, 8182, 8189, (byte) -19 ); // Fill 7 of value (byte) -19
715
Arrays.fill(CHARS, 8189, 8400, (byte) 33 ); // Fill 211 of value (byte) 33
716
Arrays.fill(CHARS, 8400, 8413, (byte) -87 ); // Fill 13 of value (byte) -87
717
Arrays.fill(CHARS, 8413, 8417, (byte) 33 ); // Fill 4 of value (byte) 33
718
CHARS[8417] = -87;
719         Arrays.fill(CHARS, 8418, 8486, (byte) 33 ); // Fill 68 of value (byte) 33
720
CHARS[8486] = -19;
721         Arrays.fill(CHARS, 8487, 8490, (byte) 33 ); // Fill 3 of value (byte) 33
722
Arrays.fill(CHARS, 8490, 8492, (byte) -19 ); // Fill 2 of value (byte) -19
723
Arrays.fill(CHARS, 8492, 8494, (byte) 33 ); // Fill 2 of value (byte) 33
724
CHARS[8494] = -19;
725         Arrays.fill(CHARS, 8495, 8576, (byte) 33 ); // Fill 81 of value (byte) 33
726
Arrays.fill(CHARS, 8576, 8579, (byte) -19 ); // Fill 3 of value (byte) -19
727
Arrays.fill(CHARS, 8579, 12293, (byte) 33 ); // Fill 3714 of value (byte) 33
728
CHARS[12293] = -87;
729         CHARS[12294] = 33;
730         CHARS[12295] = -19;
731         Arrays.fill(CHARS, 12296, 12321, (byte) 33 ); // Fill 25 of value (byte) 33
732
Arrays.fill(CHARS, 12321, 12330, (byte) -19 ); // Fill 9 of value (byte) -19
733
Arrays.fill(CHARS, 12330, 12336, (byte) -87 ); // Fill 6 of value (byte) -87
734
CHARS[12336] = 33;
735         Arrays.fill(CHARS, 12337, 12342, (byte) -87 ); // Fill 5 of value (byte) -87
736
Arrays.fill(CHARS, 12342, 12353, (byte) 33 ); // Fill 11 of value (byte) 33
737
Arrays.fill(CHARS, 12353, 12437, (byte) -19 ); // Fill 84 of value (byte) -19
738
Arrays.fill(CHARS, 12437, 12441, (byte) 33 ); // Fill 4 of value (byte) 33
739
Arrays.fill(CHARS, 12441, 12443, (byte) -87 ); // Fill 2 of value (byte) -87
740
Arrays.fill(CHARS, 12443, 12445, (byte) 33 ); // Fill 2 of value (byte) 33
741
Arrays.fill(CHARS, 12445, 12447, (byte) -87 ); // Fill 2 of value (byte) -87
742
Arrays.fill(CHARS, 12447, 12449, (byte) 33 ); // Fill 2 of value (byte) 33
743
Arrays.fill(CHARS, 12449, 12539, (byte) -19 ); // Fill 90 of value (byte) -19
744
CHARS[12539] = 33;
745         Arrays.fill(CHARS, 12540, 12543, (byte) -87 ); // Fill 3 of value (byte) -87
746
Arrays.fill(CHARS, 12543, 12549, (byte) 33 ); // Fill 6 of value (byte) 33
747
Arrays.fill(CHARS, 12549, 12589, (byte) -19 ); // Fill 40 of value (byte) -19
748
Arrays.fill(CHARS, 12589, 19968, (byte) 33 ); // Fill 7379 of value (byte) 33
749
Arrays.fill(CHARS, 19968, 40870, (byte) -19 ); // Fill 20902 of value (byte) -19
750
Arrays.fill(CHARS, 40870, 44032, (byte) 33 ); // Fill 3162 of value (byte) 33
751
Arrays.fill(CHARS, 44032, 55204, (byte) -19 ); // Fill 11172 of value (byte) -19
752
Arrays.fill(CHARS, 55204, 55296, (byte) 33 ); // Fill 92 of value (byte) 33
753
Arrays.fill(CHARS, 57344, 65534, (byte) 33 ); // Fill 8190 of value (byte) 33
754

755     } // <clinit>()
756

757     //
758
// Public static methods
759
//
760

761     /**
762      * Returns true if the specified character is a supplemental character.
763      *
764      * @param c The character to check.
765      */

766     public static boolean isSupplemental(int c) {
767         return (c >= 0x10000 && c <= 0x10FFFF);
768     }
769
770     /**
771      * Returns true the supplemental character corresponding to the given
772      * surrogates.
773      *
774      * @param h The high surrogate.
775      * @param l The low surrogate.
776      */

777     public static int supplemental(char h, char l) {
778         return (h - 0xD800) * 0x400 + (l - 0xDC00) + 0x10000;
779     }
780
781     /**
782      * Returns the high surrogate of a supplemental character
783      *
784      * @param c The supplemental character to "split".
785      */

786     public static char highSurrogate(int c) {
787         return (char) (((c - 0x00010000) >> 10) + 0xD800);
788     }
789
790     /**
791      * Returns the low surrogate of a supplemental character
792      *
793      * @param c The supplemental character to "split".
794      */

795     public static char lowSurrogate(int c) {
796         return (char) (((c - 0x00010000) & 0x3FF) + 0xDC00);
797     }
798
799     /**
800      * Returns whether the given character is a high surrogate
801      *
802      * @param c The character to check.
803      */

804     public static boolean isHighSurrogate(int c) {
805         return (0xD800 <= c && c <= 0xDBFF);
806     }
807
808     /**
809      * Returns whether the given character is a low surrogate
810      *
811      * @param c The character to check.
812      */

813     public static boolean isLowSurrogate(int c) {
814         return (0xDC00 <= c && c <= 0xDFFF);
815     }
816
817
818     /**
819      * Returns true if the specified character is valid. This method
820      * also checks the surrogate character range from 0x10000 to 0x10FFFF.
821      * <p>
822      * If the program chooses to apply the mask directly to the
823      * <code>CHARS</code> array, then they are responsible for checking
824      * the surrogate character range.
825      *
826      * @param c The character to check.
827      */

828     public static boolean isValid(int c) {
829         return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) ||
830                (0x10000 <= c && c <= 0x10FFFF);
831     } // isValid(int):boolean
832

833     /**
834      * Returns true if the specified character is invalid.
835      *
836      * @param c The character to check.
837      */

838     public static boolean isInvalid(int c) {
839         return !isValid(c);
840     } // isInvalid(int):boolean
841

842     /**
843      * Returns true if the specified character can be considered content.
844      *
845      * @param c The character to check.
846      */

847     public static boolean isContent(int c) {
848         return (c < 0x10000 && (CHARS[c] & MASK_CONTENT) != 0) ||
849                (0x10000 <= c && c <= 0x10FFFF);
850     } // isContent(int):boolean
851

852     /**
853      * Returns true if the specified character can be considered markup.
854      * Markup characters include '&lt;', '&amp;', and '%'.
855      *
856      * @param c The character to check.
857      */

858     public static boolean isMarkup(int c) {
859         return c == '<' || c == '&' || c == '%';
860     } // isMarkup(int):boolean
861

862     /**
863      * Returns true if the specified character is a space character
864      * as defined by production [3] in the XML 1.0 specification.
865      *
866      * @param c The character to check.
867      */

868     public static boolean isSpace(int c) {
869         return c <= 0x20 && (CHARS[c] & MASK_SPACE) != 0;
870     } // isSpace(int):boolean
871

872     /**
873      * Returns true if the specified character is a valid name start
874      * character as defined by production [5] in the XML 1.0
875      * specification.
876      *
877      * @param c The character to check.
878      */

879     public static boolean isNameStart(int c) {
880         return c < 0x10000 && (CHARS[c] & MASK_NAME_START) != 0;
881     } // isNameStart(int):boolean
882

883     /**
884      * Returns true if the specified character is a valid name
885      * character as defined by production [4] in the XML 1.0
886      * specification.
887      *
888      * @param c The character to check.
889      */

890     public static boolean isName(int c) {
891         return c < 0x10000 && (CHARS[c] & MASK_NAME) != 0;
892     } // isName(int):boolean
893

894     /**
895      * Returns true if the specified character is a valid NCName start
896      * character as defined by production [4] in Namespaces in XML
897      * recommendation.
898      *
899      * @param c The character to check.
900      */

901     public static boolean isNCNameStart(int c) {
902         return c < 0x10000 && (CHARS[c] & MASK_NCNAME_START) != 0;
903     } // isNCNameStart(int):boolean
904

905     /**
906      * Returns true if the specified character is a valid NCName
907      * character as defined by production [5] in Namespaces in XML
908      * recommendation.
909      *
910      * @param c The character to check.
911      */

912     public static boolean isNCName(int c) {
913         return c < 0x10000 && (CHARS[c] & MASK_NCNAME) != 0;
914     } // isNCName(int):boolean
915

916     /**
917      * Returns true if the specified character is a valid Pubid
918      * character as defined by production [13] in the XML 1.0
919      * specification.
920      *
921      * @param c The character to check.
922      */

923     public static boolean isPubid(int c) {
924         return c < 0x10000 && (CHARS[c] & MASK_PUBID) != 0;
925     } // isPubid(int):boolean
926

927     /*
928      * [5] Name ::= (Letter | '_' | ':') (NameChar)*
929      */

930     /**
931      * Check to see if a string is a valid Name according to [5]
932      * in the XML 1.0 Recommendation
933      *
934      * @param name string to check
935      * @return true if name is a valid Name
936      */

937     public static boolean isValidName(String JavaDoc name) {
938         if (name.length() == 0)
939             return false;
940         char ch = name.charAt(0);
941         if( isNameStart(ch) == false)
942            return false;
943         for (int i = 1; i < name.length(); i++ ) {
944            ch = name.charAt(i);
945            if( isName( ch ) == false ){
946               return false;
947            }
948         }
949         return true;
950     } // isValidName(String):boolean
951

952
953     /*
954      * from the namespace rec
955      * [4] NCName ::= (Letter | '_') (NCNameChar)*
956      */

957     /**
958      * Check to see if a string is a valid NCName according to [4]
959      * from the XML Namespaces 1.0 Recommendation
960      *
961      * @param name string to check
962      * @return true if name is a valid NCName
963      */

964     public static boolean isValidNCName(String JavaDoc ncName) {
965         if (ncName.length() == 0)
966             return false;
967         char ch = ncName.charAt(0);
968         if( isNCNameStart(ch) == false)
969            return false;
970         for (int i = 1; i < ncName.length(); i++ ) {
971            ch = ncName.charAt(i);
972            if( isNCName( ch ) == false ){
973               return false;
974            }
975         }
976         return true;
977     } // isValidNCName(String):boolean
978

979     /*
980      * [7] Nmtoken ::= (NameChar)+
981      */

982     /**
983      * Check to see if a string is a valid Nmtoken according to [7]
984      * in the XML 1.0 Recommendation
985      *
986      * @param nmtoken string to check
987      * @return true if nmtoken is a valid Nmtoken
988      */

989     public static boolean isValidNmtoken(String JavaDoc nmtoken) {
990         if (nmtoken.length() == 0)
991             return false;
992         for (int i = 0; i < nmtoken.length(); i++ ) {
993            char ch = nmtoken.charAt(i);
994            if( ! isName( ch ) ){
995               return false;
996            }
997         }
998         return true;
999     } // isValidName(String):boolean
1000

1001
1002
1003
1004
1005    // encodings
1006

1007    /**
1008     * Returns true if the encoding name is a valid IANA encoding.
1009     * This method does not verify that there is a decoder available
1010     * for this encoding, only that the characters are valid for an
1011     * IANA encoding name.
1012     *
1013     * @param ianaEncoding The IANA encoding name.
1014     */

1015    public static boolean isValidIANAEncoding(String JavaDoc ianaEncoding) {
1016        if (ianaEncoding != null) {
1017            int length = ianaEncoding.length();
1018            if (length > 0) {
1019                char c = ianaEncoding.charAt(0);
1020                if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) {
1021                    for (int i = 1; i < length; i++) {
1022                        c = ianaEncoding.charAt(i);
1023                        if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') &&
1024                            (c < '0' || c > '9') && c != '.' && c != '_' &&
1025                            c != '-') {
1026                            return false;
1027                        }
1028                    }
1029                    return true;
1030                }
1031            }
1032        }
1033        return false;
1034    } // isValidIANAEncoding(String):boolean
1035

1036    /**
1037     * Returns true if the encoding name is a valid Java encoding.
1038     * This method does not verify that there is a decoder available
1039     * for this encoding, only that the characters are valid for an
1040     * Java encoding name.
1041     *
1042     * @param javaEncoding The Java encoding name.
1043     */

1044    public static boolean isValidJavaEncoding(String JavaDoc javaEncoding) {
1045        if (javaEncoding != null) {
1046            int length = javaEncoding.length();
1047            if (length > 0) {
1048                for (int i = 1; i < length; i++) {
1049                    char c = javaEncoding.charAt(i);
1050                    if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') &&
1051                        (c < '0' || c > '9') && c != '.' && c != '_' &&
1052                        c != '-') {
1053                        return false;
1054                    }
1055                }
1056                return true;
1057            }
1058        }
1059        return false;
1060    } // isValidIANAEncoding(String):boolean
1061

1062
1063} // class XMLChar
1064
Popular Tags