Package io.protostuff
Class XmlXIOUtil
java.lang.Object
io.protostuff.XmlXIOUtil
IO Utils for writing xml via
XmlXOutput
.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> byte[]
toByteArray
(T message, Schema<T> schema, LinkedBuffer buffer) Serializes themessage
into a byte array using the given schema.static <T> int
writeTo
(LinkedBuffer buffer, T message, Schema<T> schema) Writes themessage
into theLinkedBuffer
using the given schema.static <T> int
writeTo
(OutputStream out, T message, Schema<T> schema, LinkedBuffer buffer) Serializes themessage
into anOutputStream
using the given schema.
-
Field Details
-
HEADER
static final byte[] HEADER
-
-
Constructor Details
-
XmlXIOUtil
private XmlXIOUtil()
-
-
Method Details
-
toByteArray
Serializes themessage
into a byte array using the given schema.- Returns:
- the byte array containing the data.
-
writeTo
Writes themessage
into theLinkedBuffer
using 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 themessage
into anOutputStream
using the given schema.- Returns:
- the size of the message
- Throws:
IOException
-