private int getCharByCode(String inp, int off) throws NumberFormatException
 {
   int radix = 10;
   String digStr = null;

	if(inp.charAt(off) == LT_HEX)
	{
		try {
			if(hexDigs.indexOf(inp.charAt(off+1)) < 0)
				return -1;
		}
		catch(StringIndexOutOfBoundsException e) {
			return -1;
		}

		radix = 16;
		digStr = hexDigs;
		++off;
	}
	else if(inp.charAt(off) == LT_OCT) {

		try {
			if(octDigs.indexOf(inp.charAt(off+1)) < 0)
				return -1;
		}
		catch(StringIndexOutOfBoundsException e) {
			return -1;
		}

		digStr = octDigs;
		radix = 8;
		++off;
	}
	else if(Character.isDigit(inp.charAt(off)))
		digStr = decDigs;
	else
		return -1;

	nBuf.setLength(0);

	try {
		for( ; digStr.indexOf(inp.charAt(off)) >= 0;
				nBuf.append(inp.charAt(off++)));
	}
	catch(StringIndexOutOfBoundsException e) {

	}
	finally {
		lastOffset = off - 1;
	}

   return Integer.parseInt(nBuf.toString(), radix);
 }