Package com.google.gson.internal
Class Streams
java.lang.Object
com.google.gson.internal.Streams
Reads and writes GSON parse trees over streams.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Adapts anAppendable
so it can be passed anywhere aWriter
is used. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonElement
parse
(JsonReader reader) Takes a reader in any state and returns the next value as a JsonElement.static void
write
(JsonElement element, JsonWriter writer) Writes the JSON element to the writer, recursively.static Writer
writerForAppendable
(Appendable appendable)
-
Constructor Details
-
Streams
private Streams()
-
-
Method Details
-
parse
Takes a reader in any state and returns the next value as a JsonElement.- Throws:
JsonParseException
-
write
Writes the JSON element to the writer, recursively.- Throws:
IOException
-
writerForAppendable
-