Package net.dona.doip.util
Class GsonUtility
java.lang.Object
net.dona.doip.util.GsonUtility
A provider of
Gson instances able to serialize instances of Stream
(as arrays) and instances of PublicKey and PrivateKey (in JSON Web Key format).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classSerializingStreams of objects in a streaming fashion, which will be useful for outputting extremely large search results.static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.google.gson.GsongetGson()Returns aGsonobject.static com.google.gson.GsonReturns aGsonwhich is configured for pretty-printing.static com.google.gson.GsonBuildersetup(com.google.gson.GsonBuilder gsonBuilder) Sets up an instance ofGsonBuilderto serialize streams and keys.
-
Constructor Details
-
GsonUtility
public GsonUtility()
-
-
Method Details
-
setup
public static com.google.gson.GsonBuilder setup(com.google.gson.GsonBuilder gsonBuilder) Sets up an instance ofGsonBuilderto serialize streams and keys.- Parameters:
gsonBuilder- the GsonBuilder- Returns:
- an instance of
GsonBuilderto serialize streams and keys
-
getGson
public static com.google.gson.Gson getGson()Returns aGsonobject.- Returns:
- a
Gsonobject
-
getPrettyGson
public static com.google.gson.Gson getPrettyGson()Returns aGsonwhich is configured for pretty-printing.- Returns:
- a Gson object which is configured for pretty-printing
-