commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@apache.org>
Subject Re: [COMPRESS] TarUtils - rename of getxxx() methods; TarArchiveEntry StringBuffer=>String
Date Thu, 02 Apr 2009 14:33:12 GMT
On Thu, Apr 2, 2009 at 16:09, sebb <sebbaz@gmail.com> wrote:
> I find it confusing to have get() as the inverse to parse() - usually
> there are parse() and format() methods.
>
> So I'd like to rename the TarUtils getXXX() methods to formatXXX()
> instead, as that is what the methods actually do - they format the
> input long or stringbuffer into a byte buffer.
>
> Any objections?

Make sense +1

> Also, TarArchiveEntry mostly uses StringBuffer rather than String. As
> the variables are rarely updated - just written and read - this seems
> unnecessary (perhaps wasteful), and does not agree with the way the
> other ArchiveEntry classes are implemented.
>
> So I'd like to change these to String instead.
> This will change the API for TarUtils.

Yeah ... looks odd. There is not much String construction happening at
all. Doesn't look like StringBuffer is the right choice here - at
least on a first quick glance.

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message