Class DTStringReader
java.lang.Object
org.sblim.cimclient.internal.cim.DTStringReader
Class DTString helps parsing CIMDateTime Strings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetPos()getPosbooleanisUnsignificantcharread()readvoidread(char c) read - Throws an IllegalArgumentException if the read character is not c.intreadintreadAndCheck(int pLen, String pFieldName, int pMin, int pMax, boolean pAllowUnsignificant) readAndCheck
-
Constructor Details
-
DTStringReader
-
-
Method Details
-
read
public int read(int pLen, String pFieldName, boolean pAllowUnsignificant) throws IllegalArgumentException read- Parameters:
pLen- - number of characters to be read from the stringpFieldName- - the name of the field which is to be read (e.g. year, month, day ...)pAllowUnsignificant-- Returns:
- int
- Throws:
IllegalArgumentException
-
readAndCheck
public int readAndCheck(int pLen, String pFieldName, int pMin, int pMax, boolean pAllowUnsignificant) throws IllegalArgumentException readAndCheck- Parameters:
pLen- - number of digits to readpFieldName- - the name of the field which is to be read (e.g. year, month, day...)pMin- - the allowed minimum value (-1 is always allowed as not significant)pMax- - the allowed maximum valuepAllowUnsignificant-- Returns:
- int
- Throws:
IllegalArgumentException
-
read
public char read()read- Returns:
- a char, 0 if failed
-
read
read - Throws an IllegalArgumentException if the read character is not c.- Parameters:
c- - contains the character which should be read from the String.- Throws:
IllegalArgumentException
-
getPos
public int getPos()getPos- Returns:
- the position in the reader
-
isUnsignificant
public boolean isUnsignificant()isUnsignificant- Returns:
- boolean
-