org.lastbamboo.common.sdp
Class StringTokenizer

java.lang.Object
  extended by org.lastbamboo.common.sdp.StringTokenizer
Direct Known Subclasses:
LexerCore

public class StringTokenizer
extends Object

Base string token splitter.

Version:
JAIN-SIP-1.1
Author:
M. Ranganathan
This code is in the public domain.

Field Summary
protected  String buffer
           
protected  int ptr
           
protected  int savedPtr
           
 
Constructor Summary
StringTokenizer()
           
StringTokenizer(String buffer)
           
 
Method Summary
 void consume()
           
 void consume(int k)
           
 String getLine()
           
 Vector 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 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 String buffer

ptr

protected int ptr

savedPtr

protected int savedPtr
Constructor Detail

StringTokenizer

public 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)

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 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 © 2013 LittleShoot. All Rights Reserved.