}else if (i1<0xdc00){ if((i1+1)==s.length()|| (s.charAt(i+1) < (0xdc00) && s.charAt(i+1)> 0xdfff)) throw new NavException(" invalid unicode in string"); int c= 0x10000+ ((i1-0xd800)<<10)+((s.charAt(i+1)-0xdc00)); if (c< (int)l1) i+=2; }else throw new NavException(" invalid unicode in string"); offset += (int) (l1 >> 32);
}else if (i1<0xdc00){ if((i+1)==s.length() || (s.charAt(i+1) < (0xdc00) || s.charAt(i+1)> 0xdfff)) throw new NavException(" invalid unicode in string"); int c= 0x10000+ ((i1-0xd800)<<10)+((s.charAt(i+1)-0xdc00)); if (c< (int)l1) i+=2; }else throw new NavException(" invalid unicode in string");
} else if (i1<0xdc00){ if((i+1)==s.length() || (s.charAt(i+1) >= (0xdbff) && s.charAt(i+1)> 0xdfff)) throw new NavException(" invalid unicode in string"); int c= 0x10000+ ((i1-0xd800)<<10)+((s.charAt(i+1)-0xdc00)); if (c< (int)l1) i+=2; }else throw new NavException(" invalid unicode in string"); offset += (int) (l1 >> 32);
break; default: throw new NavException("UTF 8 encoding error: should never happen"); temp = XMLDoc.byteAt(offset + a - i); if ((temp & 0xc0) != 0x80) throw new NavException( "UTF 8 encoding error: should never happen"); val = val | ((temp & 0x3f) << ((i << 2) + (i << 1)));
break; default: throw new NavException("UTF 8 encoding error: should never happen"); temp = XMLDoc.byteAt(offset + a - i); if ((temp & 0xc0) != 0x80) throw new NavException( "UTF 8 encoding error: should never happen"); val = val | ((temp & 0x3f) << ((i << 2) + (i << 1)));
}else if (i1<0xdc00){ if((i+1)==s.length() || (s.charAt(i+1) < (0xdc00) || s.charAt(i+1)> 0xdfff)) throw new NavException(" invalid unicode in string"); int c= 0x10000+ ((i1-0xd800)<<10)+((s.charAt(i+1)-0xdc00)); if (c< temp) i+=2; }else throw new NavException(" invalid unicode in string"); offset += (int) (l1 >> 32);
private long getChar4OtherEncoding(int offset) throws NavException{ if (encoding <= FORMAT_WIN_1258){ int temp = decode(offset); if (temp == '\r') { if (XMLDoc.byteAt(offset + 1) == '\n') { return '\n'|(2L<<32); } else { return '\n'|(1L<<32); } } return temp|(1L<<32); } throw new NavException("Unknown Encoding"); } /**
break; default: throw new NavException("UTF 8 encoding error: should never happen"); temp = XMLDoc.byteAt(offset + a - i); if ((temp & 0xc0) != 0x80) throw new NavException( "UTF 8 encoding error: should never happen"); val = val | ((temp & 0x3f) << ((i << 2) + (i << 1)));
private long getChar4OtherEncoding(int offset) throws NavException{ if (encoding <= FORMAT_WIN_1258){ int temp = decode(offset); if (temp == '\r') { if (XMLDoc.byteAt(offset + 1) == '\n') { return '\n'|(2L<<32); } else { return '\n'|(1L<<32); } } return temp|(1L<<32); } throw new NavException("Unknown Encoding"); } /**
private long getChar4OtherEncoding(int offset) throws NavException{ if (encoding <= FORMAT_WIN_1258){ int temp = decode(offset); if (temp == '\r') { if (XMLDoc.byteAt(offset + 1) == '\n') { return '\n'|(2L<<32); } else { return '\n'|(1L<<32); } } return temp|(1L<<32); } throw new NavException("Unknown Encoding"); } /**
}else if (i1<0xdc00){ if((i+1)==s.length()|| (s.charAt(i+1) < (0xdc00) || s.charAt(i+1)> 0xdfff)) throw new NavException(" invalid unicode in string"); int c= 0x10000+ ((i1-0xd800)<<10)+((s.charAt(i+1)-0xdc00)); if (c != (int) l1) i+=2; }else throw new NavException(" invalid unicode in string"); offset += (int) (l1 >> 32);
/** * Test whether the URL is defined in the scope. Null is allowed to indicate * the name space is undefined. Creation date: (11/16/03 7:54:01 PM) * * @param URL * java.lang.String * @exception com.ximpleware.NavException * When there is any encoding conversion error or unknown * entity. */ final protected int lookupNS() throws NavException { if (context[0]==-1) throw new NavException("Can't lookup NS for document node"); int i = getTokenLength((context[0] != 0) ? context[context[0]] : rootIndex); int offset = getTokenOffset((context[0] != 0) ? context[context[0]] : rootIndex); int preLen = (i >> 16) & 0xffff; return lookupNS(offset, preLen); //return resolveNS(URL, offset, preLen); }
/** * Test whether the URL is defined in the scope. Null is allowed to indicate * the name space is undefined. Creation date: (11/16/03 7:54:01 PM) * * @param URL * java.lang.String * @exception com.ximpleware.NavException * When there is any encoding conversion error or unknown * entity. */ final protected int lookupNS() throws NavException { if (context[0]==-1) throw new NavException("Can't lookup NS for document node"); int i = getTokenLength((context[0] != 0) ? context[context[0]] : rootIndex); int offset = getTokenOffset((context[0] != 0) ? context[context[0]] : rootIndex); int preLen = (i >> 16) & 0xffff; return lookupNS(offset, preLen); //return resolveNS(URL, offset, preLen); }
/** * Test whether the URL is defined in the scope. Null is allowed to indicate * the name space is undefined. Creation date: (11/16/03 7:54:01 PM) * * @param URL * java.lang.String * @exception com.ximpleware.NavException * When there is any encoding conversion error or unknown * entity. */ final protected int lookupNS() throws NavException { if (context[0]==-1) throw new NavException("Can't lookup NS for document node"); int i = getTokenLength((context[0] != 0) ? context[context[0]] : rootIndex); int offset = getTokenOffset((context[0] != 0) ? context[context[0]] : rootIndex); int preLen = (i >> 16) & 0xffff; return lookupNS(offset, preLen); //return resolveNS(URL, offset, preLen); }
} else { if (temp<0xd800 || temp>0xdbff) throw new NavException("UTF 16 LE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavException("UTF 16 LE encoding error: should never happen");
} else { if (temp<0xd800 || temp>0xdbff) throw new NavException("UTF 16 LE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavException("UTF 16 LE encoding error: should never happen");
} else { if (temp<0xd800 || temp>0xdbff) throw new NavException("UTF 16 LE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavException("UTF 16 LE encoding error: should never happen");
} else { if (temp<0xd800 || temp>0xdbff) throw new NavException("UTF 16 BE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavException("UTF 16 BE encoding error: should never happen");
} else { if (temp<0xd800 || temp>0xdbff) throw new NavException("UTF 16 BE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavException("UTF 16 BE encoding error: should never happen");
} else { if (temp<0xd800 || temp>0xdbff) throw new NavException("UTF 16 BE encoding error: should never happen"); val = temp; temp = if (temp < 0xdc00 || temp > 0xdfff) { throw new NavException("UTF 16 BE encoding error: should never happen");