Package sk.antons.json.source
Class ReaderSource
- java.lang.Object
-
- sk.antons.json.source.ReaderSource
-
- All Implemented Interfaces:
JsonSource
public class ReaderSource extends Object implements JsonSource
Json source created from Reader- Author:
- antons
-
-
Constructor Summary
Constructors Constructor Description ReaderSource(Reader reader)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcurrent()current charstatic ReaderSourceinstance(Reader reader)voidmove()move to next charintnext()next charStringrecordedContent()last recorded contentintstartRecording()starts recording of charactersintstopRecording()stops recording of characters
-
-
-
Constructor Detail
-
ReaderSource
public ReaderSource(Reader reader)
-
-
Method Detail
-
instance
public static ReaderSource instance(Reader reader)
-
current
public int current()
Description copied from interface:JsonSourcecurrent char- Specified by:
currentin interfaceJsonSource- Returns:
- current char
-
next
public int next()
Description copied from interface:JsonSourcenext char- Specified by:
nextin interfaceJsonSource- Returns:
- next char
-
move
public void move()
Description copied from interface:JsonSourcemove to next char- Specified by:
movein interfaceJsonSource
-
startRecording
public int startRecording()
Description copied from interface:JsonSourcestarts recording of characters- Specified by:
startRecordingin interfaceJsonSource- Returns:
- position of recording.
-
stopRecording
public int stopRecording()
Description copied from interface:JsonSourcestops recording of characters- Specified by:
stopRecordingin interfaceJsonSource- Returns:
- current position.
-
recordedContent
public String recordedContent()
Description copied from interface:JsonSourcelast recorded content- Specified by:
recordedContentin interfaceJsonSource- Returns:
-
-