You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2010/12/03 17:22:21 UTC

Adding utility classes

All,

There's an annoyance bug
(https://issues.apache.org/bugzilla/show_bug.cgi?id=49125) that requires
a utility to convert byte arrays into readable strings. I have a patch
that includes a method to do that, but I'm unsure of where that
"toHexString" method should go.

For now, I have placed it into
java/org/apache/tomcat/util/buf/HexUtils.java because that's where I
found other hex-encoding utility methods.

Is that an appropriate place? My only concern is that it's in the
"utils/buf" package when it's not necessarily targeted at the message
buffer code.

Thanks,
-chris


Re: Adding utility classes

Posted by Konstantin Kolinko <kn...@gmail.com>.
2010/12/3 Christopher Schultz <ch...@christopherschultz.net>:
> All,
>
> There's an annoyance bug
> (https://issues.apache.org/bugzilla/show_bug.cgi?id=49125) that requires
> a utility to convert byte arrays into readable strings. I have a patch
> that includes a method to do that, but I'm unsure of where that
> "toHexString" method should go.
>
> For now, I have placed it into
> java/org/apache/tomcat/util/buf/HexUtils.java because that's where I
> found other hex-encoding utility methods.
>
> Is that an appropriate place? My only concern is that it's in the
> "utils/buf" package when it's not necessarily targeted at the message
> buffer code.
>

Personally, I do not really care where it is.  An important thing is
into what jar the class goes. We keep the jasper self-contained in 5.5
and 6.0. In TC7 we allow it to depend on the classes packed into
tomcat-util.jar.

Don't forget to set svn:eol-style=native on the added file.

Best regards,
Konstantin Kolinko

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