145 /** 146 * ASCII character type array. 147 * 148 * This array maps an ASCII (7 bit) character to the character type.<br> 149 * Possible character type values are:<br> - ' ' for any kind of white 150 * space character;<br> - 'a' for any lower case alphabetical character 151 * value;<br> - 'A' for any upper case alphabetical character value;<br> 152 * - 'd' for any decimal digit character value;<br> - 'z' for any 153 * character less than ' ' except '\t', '\n', '\r';<br> An ASCII (7 bit) 154 * character which does not fall in any category listed above is mapped to 155 * it self. 156 */ 157 private static final byte asctyp[]; 158 /** 159 * NMTOKEN character type array. 160 * 161 * This array maps an ASCII (7 bit) character to the character type.<br> 162 * Possible character type values are:<br> - 0 for underscore ('_') or any 163 * lower and upper case alphabetical character value;<br> - 1 for colon 164 * (':') character;<br> - 2 for dash ('-') and dot ('.') or any decimal 165 * digit character value;<br> - 3 for any kind of white space character<br 166 * /> An ASCII (7 bit) character which does not fall in any category listed 167 * above is mapped to 0xff. 168 */ 169 private static final byte nmttyp[]; 170 171 /** 172 * Static constructor. 173 * 174 * Sets up the ASCII character type array which is used by 175 * {@link #asctyp asctyp} method and NMTOKEN character type array. 176 */ 177 static { 178 short i = 0; 179 180 asctyp = new byte[0x80]; 181 while (i < ' ') { 182 asctyp[i++] = (byte) 'z'; 183 } 184 asctyp['\t'] = (byte) ' '; 185 asctyp['\r'] = (byte) ' '; 186 asctyp['\n'] = (byte) ' '; | 145 /** 146 * ASCII character type array. 147 * 148 * This array maps an ASCII (7 bit) character to the character type.<br> 149 * Possible character type values are:<br> - ' ' for any kind of white 150 * space character;<br> - 'a' for any lower case alphabetical character 151 * value;<br> - 'A' for any upper case alphabetical character value;<br> 152 * - 'd' for any decimal digit character value;<br> - 'z' for any 153 * character less than ' ' except '\t', '\n', '\r';<br> An ASCII (7 bit) 154 * character which does not fall in any category listed above is mapped to 155 * it self. 156 */ 157 private static final byte asctyp[]; 158 /** 159 * NMTOKEN character type array. 160 * 161 * This array maps an ASCII (7 bit) character to the character type.<br> 162 * Possible character type values are:<br> - 0 for underscore ('_') or any 163 * lower and upper case alphabetical character value;<br> - 1 for colon 164 * (':') character;<br> - 2 for dash ('-') and dot ('.') or any decimal 165 * digit character value;<br> - 3 for any kind of white space character<br> 166 * An ASCII (7 bit) character which does not fall in any category listed 167 * above is mapped to 0xff. 168 */ 169 private static final byte nmttyp[]; 170 171 /** 172 * Static constructor. 173 * 174 * Sets up the ASCII character type array which is used by 175 * {@link #asctyp asctyp} method and NMTOKEN character type array. 176 */ 177 static { 178 short i = 0; 179 180 asctyp = new byte[0x80]; 181 while (i < ' ') { 182 asctyp[i++] = (byte) 'z'; 183 } 184 asctyp['\t'] = (byte) ' '; 185 asctyp['\r'] = (byte) ' '; 186 asctyp['\n'] = (byte) ' '; |