cynosurex.util
Class ArgumentTokenizer
java.lang.Object
cynosurex.util.ArgumentTokenizer
- All Implemented Interfaces:
- cynosurex.internal.AuthorCommon, cynosurex.internal.CommonInterface, cynosurex.internal.CompanyCommon
public class ArgumentTokenizer
- extends java.lang.Object
- implements cynosurex.internal.CommonInterface
ArgumentTokenizer tokenizes command-line arguments,
taking into account double-quoted string as a single
argument. This class is useful with the Runtime.exec ()
method.
- Version:
- 1.0
- Author:
- Chieh Cheng
Fields inherited from interface cynosurex.internal.CommonInterface |
copyright, copyrightYears, notice, program, version |
Fields inherited from interface cynosurex.internal.AuthorCommon |
author, copyrightSymbol, noticeMsg, rights |
Fields inherited from interface cynosurex.internal.CompanyCommon |
company, email, website |
Method Summary |
boolean |
hasMoreArguments()
Determines whether there are any more arguments. |
java.lang.String |
nextArgument()
Returns the next argument as a string. |
java.lang.String[] |
toArray()
This method returns all the arguments as an array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArgumentTokenizer
public ArgumentTokenizer(java.lang.String arguments)
- Constructor.
hasMoreArguments
public boolean hasMoreArguments()
- Determines whether there are any more arguments.
nextArgument
public java.lang.String nextArgument()
throws java.util.NoSuchElementException
- Returns the next argument as a string.
- Throws:
java.util.NoSuchElementException
toArray
public java.lang.String[] toArray()
- This method returns all the arguments as an array.
It is useful for the Runtime.exec () method.