Package io.protostuff

Class XmlXIOUtil

java.lang.Object
io.protostuff.XmlXIOUtil

public final class XmlXIOUtil extends Object
IO Utils for writing xml via XmlXOutput.
  • Field Details

  • Constructor Details

    • XmlXIOUtil

      private XmlXIOUtil()
  • Method Details

    • toByteArray

      public static <T> byte[] toByteArray(T message, Schema<T> schema, LinkedBuffer buffer)
      Serializes the message into 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 the message into the LinkedBuffer 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 the message into an OutputStream using the given schema.
      Returns:
      the size of the message
      Throws:
      IOException