[Ubermq-commits] jms/src/com/ubermq/kernel AbstractDatagram.java,1.7,1.7.2.1
Brought to you by:
jimmyp
From: <ji...@us...> - 2002-10-21 14:02:07
|
Update of /cvsroot/ubermq/jms/src/com/ubermq/kernel In directory usw-pr-cvs1:/tmp/cvs-serv22818/src/com/ubermq/kernel Modified Files: Tag: ubermq-1-0 AbstractDatagram.java Log Message: bug patches from 1.1 mainline Index: AbstractDatagram.java =================================================================== RCS file: /cvsroot/ubermq/jms/src/com/ubermq/kernel/AbstractDatagram.java,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** AbstractDatagram.java 16 Sep 2002 01:43:35 -0000 1.7 --- AbstractDatagram.java 21 Oct 2002 14:02:02 -0000 1.7.2.1 *************** *** 1,4 **** --- 1,5 ---- package com.ubermq.kernel; + import com.ubermq.*; import java.nio.*; import java.nio.charset.*; *************** *** 17,20 **** --- 18,24 ---- /** + * Constructs an abstract datagram with the specified + * type and flag values. + * * @param datagramType the type code of the datagram. * @param datagramFlags a set of flags that are implementation specific. *************** *** 27,30 **** --- 31,36 ---- /** + * Sets the datagram type and flags. + * * @param datagramType the type code of the datagram. * @param datagramFlags a set of flags that are implementation specific. *************** *** 44,48 **** /** * Returns a bitmask representing fields present in this ! * datagram. Used for backward compatibility. * * In this version, should return FIELDS_BASIC. --- 50,54 ---- /** * Returns a bitmask representing fields present in this ! * datagram. This should be used to enable backward compatibility. * * In this version, should return FIELDS_BASIC. *************** *** 50,56 **** public int getDatagramFieldMask() { return IDatagram.FIELDS_BASIC; } - /** - * possibly read things from the buffer. - */ public void incoming(ByteBuffer bb) throws java.io.IOException --- 56,59 ---- *************** *** 59,65 **** } - /** - * write the standard header, understood by DatagramFactory. - */ public void outgoing(ByteBuffer bb) { --- 62,65 ---- *************** *** 74,78 **** /** ! * Write a String to a buffer in UTF-8 encoding, preceded by a * two byte length. */ --- 74,78 ---- /** ! * Writes a String to a buffer in the default encoding, preceded by a * two byte length. */ *************** *** 106,110 **** ByteBuffer szb = bb.slice(); szb.limit(n); - szb.rewind(); bb.position( bb.position() + n ); --- 106,109 ---- *************** *** 213,216 **** --- 212,218 ---- { Object value = null; + if (bb.remaining() == 0) + return value; + switch(bb.get()) { |