Class XmlXIOUtil
java.lang.Object
io.protostuff.XmlXIOUtil
IO Utils for writing xml via
XmlXOutput.- Author:
- David Yu
-
Method Summary
Modifier and TypeMethodDescriptionstatic <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(OutputStream out, T message, Schema<T> schema, LinkedBuffer buffer) Serializes themessageinto anOutputStreamusing the given schema.
-
Method Details
-
toByteArray
Serializes themessageinto a byte array using the given schema.- Returns:
- the byte array containing the data.
-
writeTo
Writes themessageinto theLinkedBufferusing the given schema.- Returns:
- the size of the message
-
writeTo
public static <T> int writeTo(OutputStream out, T message, Schema<T> schema, LinkedBuffer buffer) throws IOException Serializes themessageinto anOutputStreamusing the given schema.- Returns:
- the size of the message
- Throws:
IOException
-