On Nov 19, 2007 3:18 PM, Michael McCandless <[EMAIL PROTECTED]> wrote: > I'm not sure this is good? Don't we want to [efficiently] allow > filters down the line to modify a payload (just like filters can > modify the char[] termBuffer)? Admittedly I would expect it to be > rare but I'm not sure we want to entirely rule out doing so > efficiently?
+1 So I think we all agree to do payloads by reference (do not make a copy of byte[] like termBuffer does), and to allow payload reuse. So now we still have 3 viable options still on the table I think: Token{ byte[] payload, int payloadLength, ...} Token{ byte[] payload, int payloadOffset, int payloadLength,...} Token{ Payload p, ... } If we go with Payload p, we could - Allow reuse of the Payload object itself (no reason not too right?) If so, add a setter Payload.set(byte[] payload, int offset, int length) - Allow modification of payloads by other filters? If so, add a getter byte[] getBytes() -Yonik --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]