gov.nist.core
Class StringTokenizer

java.lang.Object
  extended by gov.nist.core.StringTokenizer
Direct Known Subclasses:
LexerCore

public class StringTokenizer
extends Object

Base string token splitter.

Version:
1.2
Author:
M. Ranganathan

Field Summary
protected  char[] buffer
           
protected  int bufferLen
           
protected  int ptr
           
protected  int savedPtr
           
 
Constructor Summary
protected StringTokenizer()
           
  StringTokenizer(String buffer)
           
 
Method Summary
 void consume()
           
 void consume(int k)
           
 String getLine()
           
 Vector<String> getLines()
          Get a Vector of the buffer tokenized by lines
 char getNextChar()
           
 String getNextToken(char delim)
          Get the next token from the buffer.
static String getSDPFieldName(String line)
          get the SDP field name of the line
 boolean hasMoreChars()
           
static boolean isAlpha(char ch)
           
static boolean isAlphaDigit(char ch)
           
static boolean isDigit(char ch)
           
static boolean isHexDigit(char ch)
           
 char lookAhead()
           
 char lookAhead(int k)
           
 String nextToken()
           
 String peekLine()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

protected char[] buffer

bufferLen

protected int bufferLen

ptr

protected int ptr

savedPtr

protected int savedPtr
Constructor Detail

StringTokenizer

protected StringTokenizer()

StringTokenizer

public StringTokenizer(String buffer)
Method Detail

nextToken

public String nextToken()

hasMoreChars

public boolean hasMoreChars()

isHexDigit

public static boolean isHexDigit(char ch)

isAlpha

public static boolean isAlpha(char ch)

isDigit

public static boolean isDigit(char ch)

isAlphaDigit

public static boolean isAlphaDigit(char ch)

getLine

public String getLine()

peekLine

public String peekLine()

lookAhead

public char lookAhead()
               throws ParseException
Throws:
ParseException

lookAhead

public char lookAhead(int k)
               throws ParseException
Throws:
ParseException

getNextChar

public char getNextChar()
                 throws ParseException
Throws:
ParseException

consume

public void consume()

consume

public void consume(int k)

getLines

public Vector<String> getLines()
Get a Vector of the buffer tokenized by lines


getNextToken

public String getNextToken(char delim)
                    throws ParseException
Get the next token from the buffer.

Throws:
ParseException

getSDPFieldName

public static String getSDPFieldName(String line)
get the SDP field name of the line

Returns:
String


Copyright © 2012. All Rights Reserved.