Exactly. We're talking about 2 types of types: the finite set of types
used by JBC itself, and user-defined data types. For the former, we can
do (IMO) with encoding the type in 7 bits, for the latter we could use a
predefined type of USER and that then uses the JBMAR mechanism
Manik Surtani wrote:
On 13 May 2009, at 21:28, David M. Lloyd wrote:
> - This object is predefined = 1 byte
> - This is the custom ID of the predefined object = 1 byte
> - This is the custom object data = N bytes
Can't the first 2 be combined into a single byte? That's what I do in
my hand-wired marshaller. I assume that all objects are predefined,
and use a special, reserved 'custom ID' to denote that the object is
*not* predefined. Basically, I serialize a boolean into 2 bytes.
--
Bela Ban
Lead JGroups / Clustering Team
JBoss - a division of Red Hat