[jdom-interest] Text class in the api

philip.nelson at omniresources.com philip.nelson at omniresources.com
Tue Oct 23 16:55:32 PDT 2001

> I agree using a Text class has great advantages, but only if 
> JDOMFactory
> is modified to include a method for creating the class.


> Why would Text have to internally store things as either 
> String, StringBuffer,
> or char[]?  What about storing/retriving the content in/from 
> a file, database,
> or on/from the network?

JDOM is an in memory model.  You can always subclass....

> IMHO, have a default Text class that uses String.  Then 
> specialized classes
> can extend the default Text class to handle the special cases. 

It appears that appending is a common case and string is not the best choice
for that.  We just have to make sure that we don't penalize the common case
where all the character based content is added in one chunk.

More information about the jdom-interest mailing list