Class StringSource

java.lang.Object
sk.antons.json.source.StringSource
All Implemented Interfaces:
JsonSource

public class StringSource extends Object implements JsonSource
Json source provider created from string.
Author:
antons
  • Constructor Details

    • StringSource

      public StringSource(String content)
  • Method Details

    • instance

      public static StringSource instance(String content)
    • move

      public void move()
      Description copied from interface: JsonSource
      move to next char
      Specified by:
      move in interface JsonSource
    • current

      public int current()
      Description copied from interface: JsonSource
      current char
      Specified by:
      current in interface JsonSource
      Returns:
      current char
    • next

      public int next()
      Description copied from interface: JsonSource
      next char
      Specified by:
      next in interface JsonSource
      Returns:
      next char
    • startRecording

      public int startRecording()
      Description copied from interface: JsonSource
      starts recording of characters
      Specified by:
      startRecording in interface JsonSource
      Returns:
      position of recording.
    • stopRecording

      public int stopRecording()
      Description copied from interface: JsonSource
      stops recording of characters
      Specified by:
      stopRecording in interface JsonSource
      Returns:
      current position.
    • recordedContent

      public String recordedContent()
      Description copied from interface: JsonSource
      last recorded content
      Specified by:
      recordedContent in interface JsonSource
      Returns: