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 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.
-
Field Details
-
HEADER
static final byte[] HEADER
-
-
Constructor Details
-
XmlXIOUtil
private XmlXIOUtil()
-
-
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
-