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> voidwriteListTo(LinkedBuffer buffer, List<T> messages, Schema<T> schema, boolean numeric) Serializes themessagesinto theLinkedBufferusing the given schema.static <T> voidwriteListTo(OutputStream out, List<T> messages, Schema<T> schema, boolean numeric, LinkedBuffer buffer) Serializes themessagesinto the stream using the given schema with the supplied buffer.static <T> voidwriteTo(LinkedBuffer buffer, T message, Schema<T> schema, boolean numeric) Serializes themessageinto aLinkedBufferviaJsonXOutputusing the givenschemawith the supplied buffer.static <T extends Message<T>>
voidwriteTo(OutputStream out, T message, boolean numeric, LinkedBuffer buffer) static <T> voidwriteTo(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 themessageinto aLinkedBufferviaJsonXOutputusing the givenschemawith 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 themessagesinto theLinkedBufferusing the given schema. -
writeListTo
public static <T> void writeListTo(OutputStream out, List<T> messages, Schema<T> schema, boolean numeric, LinkedBuffer buffer) throws IOException Serializes themessagesinto the stream using the given schema with the supplied buffer.- Throws:
IOException
-