Whats the hidden size limitation of String serialization (pre-JDK 1.3)?
So for robust code you have to examine the String once to ensure that it will be less than 64Kb after encoding, and then have the JVM effectively repeat that work in the process of encoding, when you write it to an ObjectOutputStream. A possible workaround that is to strip the string down to “byte[]” and pass it around in RMI that way.