Package org.jboss.serial.data

Examples of org.jboss.serial.data.LocalMarshalledValue


    static Random random = new Random();
    private void testObject(Object obj) throws Exception
    {
        ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
        JBossObjectOutputStream objout = new JBossObjectOutputStream(byteOut);
        LocalMarshalledValue tstValue = new LocalMarshalledValue(obj);
        objout.writeObject(tstValue);
        objout.flush();

        JBossObjectInputStream objinput = new JBossObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()));
        LocalMarshalledValue localValue = (LocalMarshalledValue)objinput.readObject();

        Object value = localValue.get();
        System.out.println(value);

        assertEquals(obj,value);
    }
View Full Code Here


    static Random random = new Random();
    private void testObject(Object obj) throws Exception
    {
        ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
        JBossObjectOutputStream objout = new JBossObjectOutputStream(byteOut);
        LocalMarshalledValue tstValue = new LocalMarshalledValue(obj);
        objout.writeObject(tstValue);
        objout.flush();

        JBossObjectInputStream objinput = new JBossObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()));
        LocalMarshalledValue localValue = (LocalMarshalledValue)objinput.readObject();

        Object value = localValue.get();
        System.out.println(value);

        assertEquals(obj,value);
    }
View Full Code Here

TOP

Related Classes of org.jboss.serial.data.LocalMarshalledValue

Copyright © 2018 www.massapicom. 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.