Package io.protostuff
Class XmlXIOUtil
- java.lang.Object
-
- io.protostuff.XmlXIOUtil
-
public final class XmlXIOUtil extends java.lang.ObjectIO Utils for writing xml viaXmlXOutput.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static byte[]HEADER
-
Constructor Summary
Constructors Modifier Constructor Description privateXmlXIOUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> byte[]toByteArray(T message, Schema<T> schema, LinkedBuffer buffer)Serializes themessageinto a byte array using the given schema.static <T> intwriteTo(LinkedBuffer buffer, T message, Schema<T> schema)Writes themessageinto theLinkedBufferusing the given schema.static <T> intwriteTo(java.io.OutputStream out, T message, Schema<T> schema, LinkedBuffer buffer)Serializes themessageinto anOutputStreamusing the given schema.
-
-
-
Method Detail
-
toByteArray
public static <T> byte[] toByteArray(T message, Schema<T> schema, LinkedBuffer buffer)Serializes themessageinto a byte array using the given schema.- Returns:
- the byte array containing the data.
-
writeTo
public static <T> int writeTo(LinkedBuffer buffer, T message, Schema<T> schema)
Writes themessageinto theLinkedBufferusing the given schema.- Returns:
- the size of the message
-
writeTo
public static <T> int writeTo(java.io.OutputStream out, T message, Schema<T> schema, LinkedBuffer buffer) throws java.io.IOExceptionSerializes themessageinto anOutputStreamusing the given schema.- Returns:
- the size of the message
- Throws:
java.io.IOException
-
-