// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) braces deadcode fieldsfirst 
// Source File Name:   CharacterWalker.java
// Class Version:      45.3

package oracle.sql;

import java.sql.SQLException;
import java.util.NoSuchElementException;

// Referenced classes of package oracle.sql:
//            CharacterSet

// flag ACC_SUPER is set
public final class CharacterWalker
{
    // Constants:          54
    // Interfaces:         0
    // Fields:             5
    // Methods:            3
    // Class Attributes:   1


    CharacterSet charSet;
    byte bytes[];
    int next;
    int end;
    int shiftstate;

    // Decompiling method: <init>  Signature: (Loracle/sql/CharacterSet;[BII)V
    // Max stack: 3, #locals: 5, #params: 5
    // Code length: 55 bytes, Code offset: 693
    // Line Number Table found: 10 entries
    // Parameter  0 added: Name this Type Loracle/sql/CharacterWalker; At 0 55 Range 0 54 Init 0 fixed
    // Parameter  1 added: Name characterset Type Loracle/sql/CharacterSet; At 0 55 Range 0 54 Init 0
    // Parameter  2 added: Name abyte0 Type [B At 0 55 Range 0 54 Init 0
    // Parameter  3 added: Name i Type I At 0 55 Range 0 54 Init 0
    // Parameter  4 added: Name j Type I At 0 55 Range 0 54 Init 0
    // RetValue   5 added: Name <returnValue> Type V At 0 55 Range 0 54 Init 0 fixed
    public CharacterWalker(CharacterSet characterset, byte abyte0[], int i, int j)
    {
        super();
        charSet = characterset;
        bytes = abyte0;
        next = i;
        end = i + j;
        if(next < 0)
        {
            next = 0;
        }
        if(end > abyte0.length)
        {
            end = abyte0.length;
        }
        return;
    }

    // Decompiling method: hasMoreCharacters  Signature: ()Z
    // Max stack: 2, #locals: 1, #params: 1
    // Code length: 17 bytes, Code offset: 822
    // Line Number Table found: 1 entries
    // Parameter  0 added: Name this Type Loracle/sql/CharacterWalker; At 0 17 Range 0 16 Init 0 fixed
    // RetValue   1 added: Name <returnValue> Type Z At 0 17 Range 0 16 Init 0 fixed
    public boolean hasMoreCharacters()
    {
        return next < end;
    }

    // Decompiling method: nextCharacter  Signature: ()I
    // Max stack: 3, #locals: 2, #params: 1
    // Code length: 22 bytes, Code offset: 877
    // Exception table: 1 entries
    //           start  0 end 9 handler 9 type SQLException
    // Line Number Table found: 4 entries
    // Parameter  0 added: Name this Type Loracle/sql/CharacterWalker; At 0 22 Range 0 21 Init 0 fixed
    // RetValue   2 added: Name <returnValue> Type I At 0 22 Range 0 21 Init 0 fixed
    // LocalVar   1 added: Name sqlexception Type Ljava/sql/SQLException; At 9 6 Range 9 14 Init 9
    public int nextCharacter()
        throws NoSuchElementException
    {
        try
        {
            return charSet.decode(this);
        }
        catch(SQLException sqlexception)
        {
            throw new NoSuchElementException(sqlexception.getMessage());
        }
    }
}
