> This allways returns false. Manually checking the arrays shows that the
> two byte arrays only differ somewhere in the middle, and only for about
> 2 bytes, regardless the content of the String.
And you don't want to tell us the exact difference? E.g. showing us the
byte values which differ? Should we use our paranormal forces to guess
them?
> My question is: Is this likely to be a bug in:
> a) the transportation of Strings over RMI
> b) the transportation of byte arrays over RMI
> c) the way String.getBytes("ISO-8859-1") is implemented
> d) the way I am using rmi or the getBytes() method
Get more facts. Use
a) A debugger to inspect the original byte array and the received byte
array to check the encoding.
b) Compare the bytes to an ASCII / ISO Latin 1 code table to figure out
which characters got encoded or decoded wrongly. I am surprised that you
didn't do this already.
c) Get a network sniffer like Ethereal and check what is actually going
over the wire.
/Thomas

Signature
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
Rolfje - 27 Jul 2005 09:40 GMT
First of all, I humbly apologize for underestimating your paranormal
forces :-).
I took your advise on inspecting the byte arrays. It seems I got so
distracted by the character sets, toByteArray() and other distracting
code, that I overlooked the fact that somewhere in the middle, the
actual strings really did not match exactly.
The cause of this all was a bug in a bussines class which mutilated
itself when serializeing/ deserializing. Then, the toString() method
was used to get the (rather large) byte array from.
So, no magic here, just a plain overlooking of the obvious :-)
Thanks for putting me back on track, by sending me back to the debugger
and inspect the data byte-by-byte.
All the best,
Rolf