🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #889

Re: On java.io.NotSerializableException: java.lang.Object

#889
From: John McGrath TeamB
Date: Wed, 24 Jul 2002 02:06
35 lines
2320 bytes
On Tue, 23 Jul 2002 16:08:40 +0800, Worm Online wrote:

> I have try to out put the RTF document by using the following code:
> 
>     XMLEncoder xmle = new XMLEncoder(

You are using an XMLEncoder to save an RTF Document?  While it may be 
possible to get that to work (although I am not sure that it is), that 
is definitely not the right approach.  Even if it does work, what would 
be written could not be read by other applications that know how to 
handle RTF.  The file would have an XML representation of the internal 
structures used by the Java Document class.

The Swing text classes have facilities to write documents to files.  
This functionality is included in the EditorKit class.  For RTF 
documents, you will want to use javax.swing.text.rtf.RTFEditorKit.

For more information on how to use the Swing text classes, take a look 
at "The Java Tutorial" at:

   http://java.sun.com/docs/books/tutorial/.

I have heard that the book "Core Swing: Advanced Programming" by Kim 
Topley covers the Swing text classes in detail:

   http://www.amazon.com/exec/obidos/ASIN/0130832928/

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.17a7d3a16497b8798b8a3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3d2941ad_1@dnews> <MPG.17937befbecfabdc98b7fe@newsgroups.borland.com> <3d2ab537$1_1@dnews> <MPG.1797d02b68cb68e498b820@newsgroups.borland.com> <3d3d0e9b_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,37aa6d68d3c616d
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-07-24 00:09:01 PST
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: On java.io.NotSerializableException: java.lang.Object
Date: Tue, 23 Jul 2002 22:06:51 -0400
Message-ID: <MPG.17a7d3a16497b8798b8a3@newsgroups.borland.com>
References: <3d2941ad_1@dnews> <MPG.17937befbecfabdc98b7fe@newsgroups.borland.com> <3d2ab537$1_1@dnews> <MPG.1797d02b68cb68e498b820@newsgroups.borland.com> <3d3d0e9b_2@dnews>
X-Newsreader: MicroPlanet Gravity v2.60
NNTP-Posting-Host: 209.92.40.60
X-Trace: dnews 1027476409 209.92.40.60 (23 Jul 2002 19:06:49 -0700)
Lines: 35
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews