Package co.paralleluniverse.galaxy.core.Message

Examples of co.paralleluniverse.galaxy.core.Message.BACKUP_PACKET.toByteArray()


        final BACKUP_PACKET m1 = Message.BACKUP_PACKET(rand.nextLong(), Arrays.asList(
                Message.BACKUP(rand.nextLong(), rand.nextLong(), randomBuffer(100)),
                Message.BACKUP(rand.nextLong(), rand.nextLong(), randomBuffer(45)),
                Message.BACKUP(rand.nextLong(), rand.nextLong(), randomBuffer(70))));

        byte[] array = m1.toByteArray();
        final BACKUP_PACKET m2 = (BACKUP_PACKET) Message.fromByteArray(array);

        assertThat(m2.getId(), equalTo(m1.getId()));
        assertThat(m2.getBackups().size(), equalTo(m1.getBackups().size()));
        for (int i = 0; i < m1.getBackups().size(); i++)
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.