Package net.dona.doip.util

# Class GsonUtility.StreamGsonTypeAdapter<T>

java.lang.Object
com.google.gson.TypeAdapter<Stream<T>>
net.dona.doip.util.GsonUtility.StreamGsonTypeAdapter<T>

Type Parameters:
  `T` - the type of a StreamGsonTypeAdapter, stream, TypeAdapter, list, and object in a JSON reader

Enclosing class:
  GsonUtility

public static class GsonUtility.StreamGsonTypeAdapter<T> extends com.google.gson.TypeAdapter<Stream<T>>
Serializing `Stream`s of objects in a streaming fashion, which will be useful for outputting extremely large search results.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StreamGsonTypeAdapter(com.google.gson.TypeAdapter<T> elementAdapter)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Stream<T>`
  `read(com.google.gson.stream.JsonReader reader)`
  `void`
  `write(com.google.gson.stream.JsonWriter writer, Stream<T> stream)`

  ### Methods inherited from class com.google.gson.TypeAdapter

  `fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### StreamGsonTypeAdapter

    public StreamGsonTypeAdapter(com.google.gson.TypeAdapter<T> elementAdapter)

- ## Method Details

  - ### read

    public Stream<T> read(com.google.gson.stream.JsonReader reader) throws IOException
    Specified by:
      `read` in class `com.google.gson.TypeAdapter<Stream<T>>`
    Throws:
      `IOException`

  - ### write

    public void write(com.google.gson.stream.JsonWriter writer, Stream<T> stream) throws IOException
    Specified by:
      `write` in class `com.google.gson.TypeAdapter<Stream<T>>`
    Throws:
      `IOException`