|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.Reader
org.cip4.jdflib.cformat.ScanfReader
org.cip4.jdflib.util.SScanf
public class SScanf
| Field Summary |
|---|
| Fields inherited from class java.io.Reader |
|---|
lock |
| Constructor Summary | |
|---|---|
SScanf(String theString,
String format)
creates a scanf reader for a given string and format and returns the approriate object valid format identifiers %f - returns Double %i - returns Integer %d - returns Integer %x - returns Integer %o - returns Integer %c - returns String %s - returns String |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
|
Object |
next()
returns the next Object (@see the constructor), null if the string has been completely parsed or an invalid format is scanned |
void |
remove()
NOT IMPLEMENTED - the iterator is only forward |
double |
scanDouble(ScanfFormat fmt)
Scan and return a double, using a pre-allocated ScanfFormat object. |
String |
scanString(ScanfFormat fmt)
Scan and return a String, using a pre-allocated ScanfFormat object. |
Vector<Object> |
sscanf()
scan a string using C++ sscanf functionality |
static Vector<Object> |
sscanf(String theString,
String format)
convenience static function - see the constructor for details |
| Methods inherited from class org.cip4.jdflib.cformat.ScanfReader |
|---|
clearLookAheadChar, close, getCharNumber, getLineNumber, getLookAheadChar, lookAheadCharValid, read, scanChar, scanChar, scanChar, scanChars, scanChars, scanChars, scanDec, scanDec, scanDec, scanDouble, scanDouble, scanFloat, scanFloat, scanFloat, scanHex, scanHex, scanHex, scanInt, scanInt, scanInt, scanLong, scanLong, scanLong, scanOct, scanOct, scanOct, scanString, scanString, setCharNumber, setLineNumber, useCstandard, useCstandard |
| Methods inherited from class java.io.Reader |
|---|
mark, markSupported, read, read, read, ready, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SScanf(String theString,
String format)
theString - the String to scanformat - the formatting String to apply according to c++ sscanf rools| Method Detail |
|---|
public Vector<Object> sscanf()
public double scanDouble(ScanfFormat fmt)
throws IOException,
ScanfMatchException,
IllegalArgumentException
ScanfReader
scanDouble in class ScanfReaderfmt - Format object
ScanfMatchException - Input did not match format
EOFException - End of file
IOException - Other input error
IllegalArgumentException - Error in format specificationorg.cip4.jdflib.cformat.ScanfReader#scanDouble(org.cip4.jdflib.cformat .ScanfFormat)
public String scanString(ScanfFormat fmt)
throws IOException,
IllegalArgumentException
ScanfReader
scanString in class ScanfReaderfmt - Format object
ScanfMatchException - Input did not match format
EOFException - End of file
IOException - Other input error
IllegalArgumentException - Error in format specificationorg.cip4.jdflib.cformat.ScanfReader#scanString(org.cip4.jdflib.cformat .ScanfFormat)public boolean hasNext()
hasNext in interface Iterator<Object>Iterator.hasNext()public Object next()
next in interface Iterator<Object>public void remove()
remove in interface Iterator<Object>Iterator.remove()
public static Vector<Object> sscanf(String theString,
String format)
theString - format -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||