OSMQ
v2.0.1

osmq.util
Class TokenFinder

java.lang.Object
  extended byosmq.util.TokenFinder

public class TokenFinder
extends java.lang.Object


Constructor Summary
TokenFinder()
           
 
Method Summary
 int findTokenOccurance(byte[] s, byte token, int occurance)
          Locates an occurance of a byte within a byte array and returns its offset.
 int findTokenOccurance(java.lang.String s, char token, int occurance)
          Locates an occurance of a character within a string and returns its offset.
 int findTokenOccurance(java.lang.String s, java.lang.String token, int occurance)
          Locates an occurance of a character within a string that matches a character in another string, and returns its offset.
 int getLastFound()
           
 int getOccurance()
           
 boolean wasFound()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenFinder

public TokenFinder()
Method Detail

getLastFound

public final int getLastFound()

getOccurance

public int getOccurance()

wasFound

public final boolean wasFound()

findTokenOccurance

public final int findTokenOccurance(byte[] s,
                                    byte token,
                                    int occurance)
Locates an occurance of a byte within a byte array and returns its offset. The occurances are numbered 1-n. If the occurance is not found, returns -1. If found, returns the zero-relative offset position of the character.


findTokenOccurance

public final int findTokenOccurance(java.lang.String s,
                                    java.lang.String token,
                                    int occurance)
Locates an occurance of a character within a string that matches a character in another string, and returns its offset. The occurances are numbered 1-n. If the occurance is not found, returns -1. If found, returns the zero-relative offset position of the character.


findTokenOccurance

public final int findTokenOccurance(java.lang.String s,
                                    char token,
                                    int occurance)
Locates an occurance of a character within a string and returns its offset. The occurances are numbered 1-n. If the occurance is not found, returns -1. If found, returns the zero-relative offset position of the character.


(c) 2000 - 2003 MQue Systems
All Rights Reserved