com.antelmann.cddb
Class ArgumentParser
java.lang.Object
com.antelmann.cddb.ArgumentParser
- All Implemented Interfaces:
- Serializable
public class ArgumentParser
- extends Object
- implements Serializable
ArgumentParser is a helper class that parses arguments in results
according to CDDB Protocol level 2.
It works similarly to a StringTokenizer, but it properly handles
arguments enclosed with quotes, i.e. delimiters are not recognized
if the occurrence is within a quoted section.
- Author:
- Holger Antelmann
- See Also:
StringTokenizer,
Serialized Form
|
Field Summary |
protected String |
delimiter
protected to allow custom delimiters for subclasses |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
delimiter
protected String delimiter
- protected to allow custom delimiters for subclasses
ArgumentParser
public ArgumentParser(String line)
ArgumentParser
public ArgumentParser(String line,
String delimiter)
ArgumentParser
public ArgumentParser(String line,
int startingPosition)
remainder
public String remainder()
getAll
public static String[] getAll(String line)
getAll
public static String[] getAll(String line,
String delimiter)
hasMoreArguments
public boolean hasMoreArguments()
nextArgument
public String nextArgument()
throws NoSuchElementException
- Throws:
NoSuchElementException
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads