Code example for CharacterIterator

Methods: next

0
    private char c;
    private Object token;
    private StringBuilder buf = new StringBuilder();
 
    private char next() { 
        this.c = this.it.next();
 
        return this.c;
    } 
 
    private void skipWhiteSpace() { 
        while (Character.isWhitespace(this.c)) {
            this.next();
        } 
    } 
 
    public Object read(String string) throws JSONException {
        this.it = new StringCharacterIterator(string);
        this.c = this.it.first();
 
        return this.read();