Package org.vast.json

Class JsonReaderWithBuffer

java.lang.Object
com.google.gson.stream.JsonReader
org.vast.json.JsonReaderWithBuffer
All Implemented Interfaces:
Closeable, AutoCloseable

public class JsonReaderWithBuffer extends com.google.gson.stream.JsonReader

Implementation of JsonReader to re-stream JSON data previously buffered while waiting for a specific member name/key.

Since:
Sep 29, 2023
  • Constructor Details

    • JsonReaderWithBuffer

      public JsonReaderWithBuffer(com.google.gson.stream.JsonReader delegate)
  • Method Details

    • buffer

      public void buffer(String name)
      Buffer the next object value so it can be replayed later
      Parameters:
      name - member name
    • startReplay

      public void startReplay()
    • nextName

      public String nextName() throws IOException
      Overrides:
      nextName in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • hasNext

      public boolean hasNext() throws IOException
      Overrides:
      hasNext in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • maybeCloseTempReader

      protected void maybeCloseTempReader() throws IOException
      Throws:
      IOException
    • endObject

      public void endObject() throws IOException
      Overrides:
      endObject in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • peek

      public com.google.gson.stream.JsonToken peek() throws IOException
      Overrides:
      peek in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • beginArray

      public void beginArray() throws IOException
      Overrides:
      beginArray in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • endArray

      public void endArray() throws IOException
      Overrides:
      endArray in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • beginObject

      public void beginObject() throws IOException
      Overrides:
      beginObject in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • nextString

      public String nextString() throws IOException
      Overrides:
      nextString in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • nextBoolean

      public boolean nextBoolean() throws IOException
      Overrides:
      nextBoolean in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • nextNull

      public void nextNull() throws IOException
      Overrides:
      nextNull in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • nextDouble

      public double nextDouble() throws IOException
      Overrides:
      nextDouble in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • nextLong

      public long nextLong() throws IOException
      Overrides:
      nextLong in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • nextInt

      public int nextInt() throws IOException
      Overrides:
      nextInt in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • skipValue

      public void skipValue() throws IOException
      Overrides:
      skipValue in class com.google.gson.stream.JsonReader
      Throws:
      IOException
    • getPath

      public String getPath()
      Overrides:
      getPath in class com.google.gson.stream.JsonReader