09 November 2007

How to compare a Byte[] and a byte[] ?

I love collections in Java, they're so handy and I too think arrays should be deprecated.
But a lot of functions return just plain arrays.

So I happen to compare an array of objects Byte (returned by an ArrayList) and an array of plain bytes, returned by a ByteArrayOutputStream.
I know an array of Bytes is an array of p... ehm, references so its nature is totally different from the one of an array that contains primitive types.
But I wish there was a method to compare the two, so clever to do boxing/unboxing automatically.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.