How to save/load JTextPane to/from file?



I have searched news groups and othe major Java fora but got no
definitive answer. I don't specify any specific doc format like RTF or
HTML, just a generic JTextPane that includes text, attributes, images
and other sub components. How to save it onto a file and load back it
onto a new JTextPane?
.