com.ctc.wstx.exc.WstxUnexpectedCharException类的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(709)

本文整理了Java中com.ctc.wstx.exc.WstxUnexpectedCharException类的一些代码示例,展示了WstxUnexpectedCharException类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WstxUnexpectedCharException类的具体详情如下:
包路径:com.ctc.wstx.exc.WstxUnexpectedCharException
类名称:WstxUnexpectedCharException

WstxUnexpectedCharException介绍

[英]Generic exception type that indicates that tokenizer/parser encountered unexpected (but not necessarily invalid per se) character; character that is not legal in current context. Could happen, for example, if white space was missing between attribute value and name of next attribute.
[中]泛型异常类型,指示标记器/解析器遇到意外(但本身不一定无效)字符;在当前上下文中不合法的字符。例如,如果属性值和下一个属性的名称之间缺少空格,可能会发生这种情况。

代码示例

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl

  1. protected WstxException constructNullCharException()
  2. {
  3. return new WstxUnexpectedCharException("Illegal character (NULL, unicode 0) encountered: not valid in any content",
  4. getLastCharLocation(), CHAR_NULL);
  5. }

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl

  1. protected void reportUnexpectedChar(int i, String msg)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. String excMsg;
  6. // WTF? JDK thinks null char is just fine as?!
  7. if (Character.isISOControl(c)) {
  8. excMsg = "Unexpected character (CTRL-CHAR, code "+i+")"+msg;
  9. } else {
  10. excMsg = "Unexpected character '"+c+"' (code "+i+")"+msg;
  11. }
  12. Location loc = getLocation();
  13. throw new WstxUnexpectedCharException(excMsg, loc, c);
  14. }

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl

  1. protected void throwUnexpectedChar(int i, String msg)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. String excMsg = "Unexpected character "+getCharDesc(c)+msg;
  6. throw new WstxUnexpectedCharException(excMsg, getLastCharLocation(), c);
  7. }

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-asl

  1. protected WstxException throwInvalidSpace(int i, boolean deferErrors)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. WstxException ex;
  6. if (c == CHAR_NULL) {
  7. ex = constructNullCharException();
  8. } else {
  9. String msg = "Illegal character ("+getCharDesc(c)+")";
  10. if (mXml11) {
  11. msg += " [note: in XML 1.1, it could be included via entity expansion]";
  12. }
  13. ex = new WstxUnexpectedCharException(msg, getLastCharLocation(), c);
  14. }
  15. if (!deferErrors) {
  16. throw ex;
  17. }
  18. return ex;
  19. }

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl

  1. protected WstxException constructNullCharException()
  2. {
  3. return new WstxUnexpectedCharException("Illegal character (NULL, unicode 0) encountered: not valid in any content",
  4. getLastCharLocation(), CHAR_NULL);
  5. }

代码示例来源:origin: mguessan/davmail

  1. protected WstxException constructNullCharException()
  2. {
  3. return new WstxUnexpectedCharException("Illegal character (NULL, unicode 0) encountered: not valid in any content",
  4. getLastCharLocation(), CHAR_NULL);
  5. }

代码示例来源:origin: com.fasterxml.woodstox/woodstox-core

  1. protected WstxException constructNullCharException()
  2. {
  3. return new WstxUnexpectedCharException("Illegal character (NULL, unicode 0) encountered: not valid in any content",
  4. getLastCharLocation(), CHAR_NULL);
  5. }

代码示例来源:origin: com.fasterxml.woodstox/woodstox-core

  1. protected void reportUnexpectedChar(int i, String msg)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. String excMsg;
  6. // WTF? JDK thinks null char is just fine as?!
  7. if (Character.isISOControl(c)) {
  8. excMsg = "Unexpected character (CTRL-CHAR, code "+i+")"+msg;
  9. } else {
  10. excMsg = "Unexpected character '"+c+"' (code "+i+")"+msg;
  11. }
  12. Location loc = getLocation();
  13. throw new WstxUnexpectedCharException(excMsg, loc, c);
  14. }

代码示例来源:origin: Nextdoor/bender

  1. protected WstxException constructNullCharException()
  2. {
  3. return new WstxUnexpectedCharException("Illegal character (NULL, unicode 0) encountered: not valid in any content",
  4. getLastCharLocation(), CHAR_NULL);
  5. }

代码示例来源:origin: FasterXML/woodstox

  1. protected WstxException constructNullCharException()
  2. {
  3. return new WstxUnexpectedCharException("Illegal character (NULL, unicode 0) encountered: not valid in any content",
  4. getLastCharLocation(), CHAR_NULL);
  5. }

代码示例来源:origin: FasterXML/woodstox

  1. protected void reportUnexpectedChar(int i, String msg)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. String excMsg;
  6. // WTF? JDK thinks null char is just fine as?!
  7. if (Character.isISOControl(c)) {
  8. excMsg = "Unexpected character (CTRL-CHAR, code "+i+")"+msg;
  9. } else {
  10. excMsg = "Unexpected character '"+c+"' (code "+i+")"+msg;
  11. }
  12. Location loc = getLocation();
  13. throw new WstxUnexpectedCharException(excMsg, loc, c);
  14. }

代码示例来源:origin: woodstox/wstx-asl

  1. protected void reportUnexpectedChar(int i, String msg)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. String excMsg;
  6. // WTF? JDK thinks null char is just fine as?!
  7. if (Character.isISOControl(c)) {
  8. excMsg = "Unexpected character (CTRL-CHAR, code "+i+")"+msg;
  9. } else {
  10. excMsg = "Unexpected character '"+c+"' (code "+i+")"+msg;
  11. }
  12. Location loc = getLocation();
  13. throw new WstxUnexpectedCharException(excMsg, loc, c);
  14. }

代码示例来源:origin: woodstox/wstx-asl

  1. protected WstxException constructNullCharException()
  2. {
  3. return new WstxUnexpectedCharException("Illegal character (NULL, unicode 0) encountered: not valid in any content", getLastCharLocation(), CHAR_NULL);
  4. }

代码示例来源:origin: Nextdoor/bender

  1. protected void reportUnexpectedChar(int i, String msg)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. String excMsg;
  6. // WTF? JDK thinks null char is just fine as?!
  7. if (Character.isISOControl(c)) {
  8. excMsg = "Unexpected character (CTRL-CHAR, code "+i+")"+msg;
  9. } else {
  10. excMsg = "Unexpected character '"+c+"' (code "+i+")"+msg;
  11. }
  12. Location loc = getLocation();
  13. throw new WstxUnexpectedCharException(excMsg, loc, c);
  14. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

  1. protected WstxException constructNullCharException()
  2. {
  3. return new WstxUnexpectedCharException("Illegal character (NULL, unicode 0) encountered: not valid in any content", getLastCharLocation(), CHAR_NULL);
  4. }

代码示例来源:origin: woodstox/wstx-lgpl

  1. protected WstxException constructNullCharException()
  2. {
  3. return new WstxUnexpectedCharException("Illegal character (NULL, unicode 0) encountered: not valid in any content", getLastCharLocation(), CHAR_NULL);
  4. }

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl

  1. protected void reportUnexpectedChar(int i, String msg)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. String excMsg;
  6. // WTF? JDK thinks null char is just fine as?!
  7. if (Character.isISOControl(c)) {
  8. excMsg = "Unexpected character (CTRL-CHAR, code "+i+")"+msg;
  9. } else {
  10. excMsg = "Unexpected character '"+c+"' (code "+i+")"+msg;
  11. }
  12. Location loc = getLocation();
  13. throw new WstxUnexpectedCharException(excMsg, loc, c);
  14. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.woodstox

  1. protected void reportUnexpectedChar(int i, String msg)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. String excMsg;
  6. // WTF? JDK thinks null char is just fine as?!
  7. if (Character.isISOControl(c)) {
  8. excMsg = "Unexpected character (CTRL-CHAR, code "+i+")"+msg;
  9. } else {
  10. excMsg = "Unexpected character '"+c+"' (code "+i+")"+msg;
  11. }
  12. Location loc = getLocation();
  13. throw new WstxUnexpectedCharException(excMsg, loc, c);
  14. }

代码示例来源:origin: woodstox/wstx-lgpl

  1. protected void reportUnexpectedChar(int i, String msg)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. String excMsg;
  6. // WTF? JDK thinks null char is just fine as?!
  7. if (Character.isISOControl(c)) {
  8. excMsg = "Unexpected character (CTRL-CHAR, code "+i+")"+msg;
  9. } else {
  10. excMsg = "Unexpected character '"+c+"' (code "+i+")"+msg;
  11. }
  12. Location loc = getLocation();
  13. throw new WstxUnexpectedCharException(excMsg, loc, c);
  14. }

代码示例来源:origin: org.codehaus.woodstox/woodstox-core-lgpl

  1. protected void throwUnexpectedChar(int i, String msg)
  2. throws WstxException
  3. {
  4. char c = (char) i;
  5. String excMsg = "Unexpected character "+getCharDesc(c)+msg;
  6. throw new WstxUnexpectedCharException(excMsg, getLastCharLocation(), c);
  7. }

相关文章

WstxUnexpectedCharException类方法