[jdom-interest] org.jdom.Namespace not implementing Serializa
Humphrey.Sheil at Kadius.com
Fri Jul 21 01:13:44 PDT 2000
I should have traversed the entire object graph to find this.
I was hoping to avoid having to serialize the Document to a string. The JDK
has imposed a hard 64k limit on the serialized form of a string (in
java.io.DataOutputStream), since it uses the first two bytes of the
underlying array to store the size of the array. Any bigger and a
UTFDataFormatException will be thrown.
From: Jools Enticknap [mailto:jools at jools.org]
Sent: 20 July 2000 19:32
To: Humphrey Sheil
Cc: 'jdom-interest at jdom.org'
Subject: Re: [jdom-interest] org.jdom.Namespace not implementing
> 1. Should Namespace be Serializable? I don't think so - the javadoc says
> that it is not just a namespace - it is also a factory for creating them.
It's still an issue, there was a discussion about it, check the archives.
> 2. Anybody got any idea why RMI tries to serialize Namespace in the first
> place when I'm only trying to pass around an instance of a Document
> contains no references to Namespace)?
A Document contains references to Element, which in turn has references to
Namespace. For the object to be serialized all the objects it references
to must also be serializable.
Can I suggest that you serialize the document into a String and then send
that over the wire. The client can then create a JDOM object from the
String using the SAXBuilder class.
To control your jdom-interest membership:
More information about the jdom-interest