XStream
  1. XStream
  2. XSTR-169

XStream facade to create ObjectOutputStream/ObjectInputStream

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1
    • Component/s: None
    • Labels:
      None

      Description

      XStream already provides a mechanism for having an XML backed ObjectInputStream/ObjectOutputStream (necessary for implementing Serializable/Externalizable support).

      A simple method should be added to the XStream facade making it easy to create one of these - allowing XStream to be used in many places as a drop in replacement to standard Java serialization.

      So, instead of:

      ObjectOutputStream oos = new ObjectOutputStream(out);
      oos.writeObject(myObject);

      You could do:

      ObjectOutputStream oos = xstream.createObjectOutputStream(out, "root-element");
      oos.writeObject(myObject);

        People

        • Assignee:
          Unassigned
          Reporter:
          Joe Walnes
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: