Package io.protostuff
Class JsonXIOUtil
java.lang.Object
io.protostuff.JsonXIOUtil
Json serialization via
JsonXOutput
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> byte[]
toByteArray
(T message, Schema<T> schema, boolean numeric, LinkedBuffer buffer) static <T> void
writeListTo
(LinkedBuffer buffer, List<T> messages, Schema<T> schema, boolean numeric) Serializes themessages
into theLinkedBuffer
using the given schema.static <T> void
writeListTo
(OutputStream out, List<T> messages, Schema<T> schema, boolean numeric, LinkedBuffer buffer) Serializes themessages
into the stream using the given schema with the supplied buffer.static <T> void
writeTo
(LinkedBuffer buffer, T message, Schema<T> schema, boolean numeric) Serializes themessage
into aLinkedBuffer
viaJsonXOutput
using the givenschema
with the supplied buffer.static <T extends Message<T>>
voidwriteTo
(OutputStream out, T message, boolean numeric, LinkedBuffer buffer) static <T> void
writeTo
(OutputStream out, T message, Schema<T> schema, boolean numeric, LinkedBuffer buffer)
-
Field Details
-
EMPTY_ARRAY
private static final byte[] EMPTY_ARRAY
-
-
Constructor Details
-
JsonXIOUtil
public JsonXIOUtil()
-
-
Method Details
-
toByteArray
public static <T> byte[] toByteArray(T message, Schema<T> schema, boolean numeric, LinkedBuffer buffer) -
writeTo
Serializes themessage
into aLinkedBuffer
viaJsonXOutput
using the givenschema
with the supplied buffer. -
writeTo
public static <T extends Message<T>> void writeTo(OutputStream out, T message, boolean numeric, LinkedBuffer buffer) throws IOException - Throws:
IOException
-
writeTo
public static <T> void writeTo(OutputStream out, T message, Schema<T> schema, boolean numeric, LinkedBuffer buffer) throws IOException - Throws:
IOException
-
writeListTo
public static <T> void writeListTo(LinkedBuffer buffer, List<T> messages, Schema<T> schema, boolean numeric) Serializes themessages
into theLinkedBuffer
using the given schema. -
writeListTo
public static <T> void writeListTo(OutputStream out, List<T> messages, Schema<T> schema, boolean numeric, LinkedBuffer buffer) throws IOException Serializes themessages
into the stream using the given schema with the supplied buffer.- Throws:
IOException
-