All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.util.JCCSVTokenizer

java.lang.Object
   |
   +----jclass.util.JCCSVTokenizer

public class JCCSVTokenizer
extends Object
This class parses comma-separated value strings. If a value contains a comma, it is encased in quotes. If a value contains a quote, a quote precedes it. Example usage:
	String token, s = "this,is,a,,test";
	JCCSVTokenizer st = new JCCSVTokenizer(s);
	while (st.hasMoreTokens()) {
	    token = st.nextToken();
		println(token);
  }
 
This prints the following to the console:
	this
	is
	a
	test
 


Constructor Index

 o JCCSVTokenizer(String)

Method Index

 o countTokens()
This returns the next number of tokens in the string.
 o getPosition()
This returns the current scan position within the string.
 o hasMoreTokens()
This returns true if more tokens exist.
 o nextToken()
This gets the next token from the string.

Constructors

 o JCCSVTokenizer
  public JCCSVTokenizer(String s)

Methods

 o nextToken
  public String nextToken()
This gets the next token from the string.

 o countTokens
  public int countTokens()
This returns the next number of tokens in the string.

 o hasMoreTokens
  public boolean hasMoreTokens()
This returns true if more tokens exist.

 o getPosition
  public int getPosition()
This returns the current scan position within the string.


All Packages  Class Hierarchy  This Package  Previous  Next  Index