Code example for CharacterIterator

Methods: next, previous

0
     */ 
    private char parseEscapedCharacter() 
    { 
        char c;
 
        if (isOctDigit(c = ci.next()))
        { 
            int i = (c - '0');
 
            if (isOctDigit(c = ci.next()))
            { 
                i = i * 8 + (c - '0');
 
                if (isOctDigit(c = ci.next()))
                { 
                    i = i * 8 + (c - '0');
                } 
                else 
                { 
                    ci.previous();
                } 
            } 
            else 
            { 
                ci.previous();
            } 
 
            if (i > 0xff)
            { 
                throw new NucleusUserException("Invalid character escape: '\\" + Integer.toOctalString(i) + "'");