Avoiding MONSTEROUS overkill in Serialization?
I have a JTextPane that I need to serialize. All I really need to save is the x,y,height,width, and the marked-up text from the field. (font, size, color, bold, italic.) A test case I set up should have taken about 100 to 120 bytes to capture every bit of data I need. Yet when I serialize the instance it ends up writing a file that's 18K long and filled with mountains, foothills, and gently rolling fields of irrelevant data.
That would not be such a problem, except that my actual application has dozens and dozens of JTextPanes in the same application that all need to be saved together into a single XML file. Is there an easy way just to extract the marked-up text from a JTextPane without the truckloads of superfluous garbage that serialize insists on including?
Want I would really dearly love to have is a StyledDocument to HTML conversion, but no such thing seems to exist, so I need to figure out how to grab the data and write such a conversion.
Thanks,
--gary

