Oracle JDBC API Reference
11g Release 2 ("11.2.0.3.0")

oracle.sql
Class CharacterWalker

java.lang.Object
  extended by oracle.sql.CharacterWalker

public final class CharacterWalker
extends java.lang.Object

A CharacterWalker lets you walk through the characters that are represented as a sequence of bytes in some CharacterSet.

A character set determines a 32 bit value for each character. The values from 0 to 64K are reserved for their Unicode interpretation. Otherwise the value has no particular significance. But values can be used to build up another sequence with a CharacterBuffer.

See Also:
CharacterSet, CharacterBuffer

Field Summary
static java.lang.String BUILD_DATE
           
static boolean TRACE
           
 
Constructor Summary
CharacterWalker(CharacterSet charSet, byte[] bytes, int offset, int count)
          Constructor.
 
Method Summary
 boolean hasMoreCharacters()
          Reports whether there are more bytes waiting to be converted.
 int nextCharacter()
          Returns the next character in the sequence and advances the CharacterWalker over it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUILD_DATE

public static final java.lang.String BUILD_DATE
See Also:
Constant Field Values

TRACE

public static final boolean TRACE
See Also:
Constant Field Values
Constructor Detail

CharacterWalker

public CharacterWalker(CharacterSet charSet,
                       byte[] bytes,
                       int offset,
                       int count)
Constructor.

Parameters:
charSet - the CharacterSet to be used in interpreting the bytes.
bytes - the byte array containing the data to be interpreted.
offset - the index in bytes of the first byte to be interpreted.
count - the number of bytes to be interpreted.
Method Detail

nextCharacter

public int nextCharacter()
                  throws java.util.NoSuchElementException
Returns the next character in the sequence and advances the CharacterWalker over it.

Returns:
the 32 bit representation of the next character
Throws:
java.util.NoSuchElementException - if the walker has already returned the last character or the sequence is ill-formed. That is, the next bytes are somehow not allowed in the given representation

hasMoreCharacters

public boolean hasMoreCharacters()
Reports whether there are more bytes waiting to be converted. Note that even if hasMoreCharacters returns true, it's possible for nextCharacter to throw an exception because the bytes aren't well-formed.


Oracle JDBC API Reference
11g Release 2 ("11.2.0.3.0")

Copyright © 1998, 2007, Oracle. All rights reserved.