public class Getopt
extends java.lang.Object
| Constructor and Description |
|---|
Getopt(java.lang.String[] argv,
java.lang.String opts)
Creates a new instance of Getopt
|
| Modifier and Type | Method and Description |
|---|---|
int |
getOpt()
Get the next option in the options string.
|
java.lang.String |
getOptarg()
Get the argument to the current option
|
int |
getOptind()
Get the index of the first argument
|
void |
parse()
Parse the command lineoptions
|
void |
reset()
Reset the current pointer so we may traverse all the options again..
|
public Getopt(java.lang.String[] argv,
java.lang.String opts)
argv - argument vectoropts - the list of allowed optionspublic void parse()
throws java.text.ParseException
java.text.ParseException - if an illegal argument is passedpublic int getOpt()
public void reset()
public java.lang.String getOptarg()
public int getOptind()