Package com.google.gson.internal
Class Streams
- java.lang.Object
-
- com.google.gson.internal.Streams
-
public final class Streams extends java.lang.ObjectReads and writes GSON parse trees over streams.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classStreams.AppendableWriterAdapts anAppendableso it can be passed anywhere aWriteris used.
-
Constructor Summary
Constructors Modifier Constructor Description privateStreams()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JsonElementparse(JsonReader reader)Takes a reader in any state and returns the next value as a JsonElement.static voidwrite(JsonElement element, JsonWriter writer)Writes the JSON element to the writer, recursively.static java.io.WriterwriterForAppendable(java.lang.Appendable appendable)
-
-
-
Method Detail
-
parse
public static JsonElement parse(JsonReader reader) throws JsonParseException
Takes a reader in any state and returns the next value as a JsonElement.- Throws:
JsonParseException
-
write
public static void write(JsonElement element, JsonWriter writer) throws java.io.IOException
Writes the JSON element to the writer, recursively.- Throws:
java.io.IOException
-
writerForAppendable
public static java.io.Writer writerForAppendable(java.lang.Appendable appendable)
-
-