Add default constructor

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@549805 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-06-22 12:47:12 +00:00
parent 9c2f043a65
commit 7993aae794
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import org.apache.activemq.kaha.Marshaller;
import org.apache.activemq.openwire.OpenWireFormat;
import org.apache.activemq.util.ByteSequence;
import org.apache.activemq.wireformat.WireFormat;
@ -36,6 +37,10 @@ public class CommandMarshaller implements Marshaller<Object> {
}
public CommandMarshaller(){
this(new OpenWireFormat());
}
public void writePayload(Object object,DataOutput dataOut) throws IOException{
ByteSequence packet = wireFormat.marshal(object);
dataOut.writeInt(packet.length);