directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Cruise <>
Subject Re: [mina] sample with XML
Date Wed, 18 Jan 2006 00:19:30 GMT
Justin Johnson wrote:

> 3. Insert length of XML packet information at the beginning for the 
> XML data.

You could always include your length info into the payload, and make 
implementors promise to put it in the first 1KB (for example) of the 
stream.  Something like this:

<metaFile len="12345" xmlns="">
    <setAbort len="1">shpl0itz!</setAbort>

Please remember that you can't fully trust this kind of number that 
comes in over the wire, and it makes no difference whether it's in- or 
out-of-band.  Luckily we have ArrayIndexOutOfBoundsException... :)


View raw message