Examples of BinaryStreamReader


Examples of com.thoughtworks.xstream.io.binary.BinaryStreamReader

    public void serialize(Object object, OutputStream output) throws Exception {
        xstream.marshal(object, new BinaryStreamWriter(output));
    }

    public Object deserialize(InputStream input) throws Exception {
        return xstream.unmarshal(new BinaryStreamReader(input));
    }
View Full Code Here

Examples of com.thoughtworks.xstream.io.binary.BinaryStreamReader

        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        xstream.marshal(root, new BinaryStreamWriter(outputStream));

        // Deserialize the binary and check it equals the original object.
        ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
        Object binaryResult = xstream.unmarshal(new BinaryStreamReader(inputStream));
        assertObjectsEqual(root, binaryResult);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.