dev@fi.java.net

Re: Encoding algorithms

From: Alan Hudson <giles_at_yumetech.com>
Date: Wed, 09 Feb 2005 08:57:44 -0800

Paul Sandoz wrote:

>
>> Instead of a wrapper class, how about a getNumberBytesWritten to get
>> the last number of bytes?
>>
>
> But then it would not necessarily be thread safe.
>
ah, true.

> Perhaps it might be better to mandate the use of a holder for the
> input with the return of a boolean value if reallocation occurs and
> the state of the holder changes?
>
hmm, I know I've seen the method you proposed before in java apis, not
sure I've seen the other. My main concern was avoiding any extra
copying of data, but I assume it would just pass back a reference.