package org.jgroups.tests;
import org.jgroups.Message;
import org.jgroups.conf.ClassConfigurator;
import java.io.DataInputStream;
import java.io.FileInputStream;
/**
* @author Bela Ban
* @version $Id$
*/
public class bla {
static final byte LIST = 1; // we have a list of messages rather than a single message when set
static final byte MULTICAST = 2;
public static void main(String[] args) throws Exception {
DataInputStream in=new DataInputStream(new FileInputStream("c:\\data.dat"));
short version=in.readShort();
byte flags=in.readByte();
boolean is_message_list=(flags & LIST) == LIST;
boolean multicast=(flags & MULTICAST) == MULTICAST;
ClassConfigurator config=ClassConfigurator.getInstance(true);
Message msg=new Message(false); // don't create headers, readFrom() will do this
msg.readFrom(in);
// postUnmarshalling(msg, dest, sender, multicast); // allows for optimization by subclass
}
}
|