Package io.protostuff
Class JsonXIOUtil
- java.lang.Object
-
- io.protostuff.JsonXIOUtil
-
public final class JsonXIOUtil extends java.lang.Object
Json serialization viaJsonXOutput
.
-
-
Field Summary
Fields Modifier and Type Field Description private static byte[]
EMPTY_ARRAY
-
Constructor Summary
Constructors Constructor Description JsonXIOUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> byte[]
toByteArray(T message, Schema<T> schema, boolean numeric, LinkedBuffer buffer)
static <T> void
writeListTo(LinkedBuffer buffer, java.util.List<T> messages, Schema<T> schema, boolean numeric)
Serializes themessages
into theLinkedBuffer
using the given schema.static <T> void
writeListTo(java.io.OutputStream out, java.util.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(java.io.OutputStream out, T message, boolean numeric, LinkedBuffer buffer)
static <T> void
writeTo(java.io.OutputStream out, T message, Schema<T> schema, boolean numeric, LinkedBuffer buffer)
-
-
-
Method Detail
-
toByteArray
public static <T> byte[] toByteArray(T message, Schema<T> schema, boolean numeric, LinkedBuffer buffer)
-
writeTo
public 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.
-
writeTo
public static <T extends Message<T>> void writeTo(java.io.OutputStream out, T message, boolean numeric, LinkedBuffer buffer) throws java.io.IOException
- Throws:
java.io.IOException
-
writeTo
public static <T> void writeTo(java.io.OutputStream out, T message, Schema<T> schema, boolean numeric, LinkedBuffer buffer) throws java.io.IOException
- Throws:
java.io.IOException
-
writeListTo
public static <T> void writeListTo(LinkedBuffer buffer, java.util.List<T> messages, Schema<T> schema, boolean numeric)
Serializes themessages
into theLinkedBuffer
using the given schema.
-
writeListTo
public static <T> void writeListTo(java.io.OutputStream out, java.util.List<T> messages, Schema<T> schema, boolean numeric, LinkedBuffer buffer) throws java.io.IOException
Serializes themessages
into the stream using the given schema with the supplied buffer.- Throws:
java.io.IOException
-
-