Package org.nustaq.kson
Class KsonStringCharInput
java.lang.Object
org.nustaq.kson.KsonStringCharInput
- All Implemented Interfaces:
KsonCharInput
public class KsonStringCharInput extends java.lang.Object implements KsonCharInput
implementation of char input on top of a String
-
Constructor Summary
Constructors Constructor Description KsonStringCharInput(java.lang.CharSequence s)KsonStringCharInput(java.lang.String s, int pos, int len) -
Method Summary
-
Constructor Details
-
KsonStringCharInput
public KsonStringCharInput(java.lang.CharSequence s) -
KsonStringCharInput
public KsonStringCharInput(java.lang.String s, int pos, int len)
-
-
Method Details
-
readChar
public int readChar()- Specified by:
readCharin interfaceKsonCharInput- Returns:
- char or -1 for eof
-
peekChar
public int peekChar()- Specified by:
peekCharin interfaceKsonCharInput
-
position
public int position()- Specified by:
positionin interfaceKsonCharInput
-
back
public int back(int num)- Specified by:
backin interfaceKsonCharInput
-
isEof
public boolean isEof()- Specified by:
isEofin interfaceKsonCharInput
-
getString
public java.lang.String getString(int pos, int length)- Specified by:
getStringin interfaceKsonCharInput
-