Article View: borland.public.jbuilder.java.api
Article #2252Re: SERIALIZING a CLASS containing non SERIALIZABLE objects
From: Jon Skeet
Date: Tue, 10 Apr 2001 08:59
Date: Tue, 10 Apr 2001 08:59
19 lines
2382 bytes
2382 bytes
Laurent Souriau <lsouriau@club-internet.fr> wrote: > I have a problem with a self made class that I want to make serializable. > Everything is Ok, except for a member of this class which is a > BufferedReader (non serializable). It gives me a NULL pointer exception > on it. I tried to declare it as : > ---- > private transient BufferedReader data; > ---- > But it doesn't improve the things. It would help if you said exactly *what* gave the the NullPointerException. What were you trying to do? Yes, a deserialised object containing a transient reference will have a null reference afterwards, as you'd expect. Is this what's giving you the NPE? -- Jon Skeet - skeet@pobox.com http://www.pobox.com/~skeet If replying to the group, please don't mail me at the same time
Technical Details
Message-ID:
<MPG.153cdbdce33a0a2f98a207@10.1.1.51>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!newsfeed.berkeley.edu!ucberkeley!join.news.pipex.net!pipex!warm.news.pipex.net!pipex!tube.news.pipex.net!pipex!news.peramon.com!10.1.3.5References:
<9aufdi$k94$1@s1.read.news.oleane.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10568c,7c0ff242316c0dd1 X-Google-Attributes: gid10568c,public X-Google-Thread: 1089d0,7c0ff242316c0dd1 X-Google-Attributes: gid1089d0,public X-Google-Thread: 113ae9,7c0ff242316c0dd1 X-Google-Attributes: gid113ae9,public X-Google-Thread: f6cb0,7c0ff242316c0dd1 X-Google-Attributes: gidf6cb0,public X-Google-Thread: f74b3,7c0ff242316c0dd1 X-Google-Attributes: gidf74b3,public X-Google-Thread: f631b,7c0ff242316c0dd1 X-Google-Attributes: gidf631b,public X-Google-Thread: 10a146,7c0ff242316c0dd1 X-Google-Attributes: gid10a146,public X-Google-ArrivalTime: 2001-04-10 02:05:01 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!newsfeed.berkeley.edu!ucberkeley!join.news.pipex.net!pipex!warm.news.pipex.net!pipex!tube.news.pipex.net!pipex!news.peramon.com!10.1.3.5 From: Jon Skeet <skeet@pobox.com> Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language,cn.bbs.comp.lang.java,comp.lang.java.help,comp.lang.java.programmer,de.comp.lang.java,fr.comp.lang.java Subject: Re: SERIALIZING a CLASS containing non SERIALIZABLE objects Date: Tue, 10 Apr 2001 09:59:42 +0100 Organization: Peramon Technology Ltd. Lines: 19 Message-ID: <MPG.153cdbdce33a0a2f98a207@10.1.1.51> References: <9aufdi$k94$1@s1.read.news.oleane.net> NNTP-Posting-Host: fw1.peramon.com X-Trace: soap.pipex.net 986893062 16147 193.132.195.113 (10 Apr 2001 08:57:42 GMT) X-Complaints-To: abuse@uk.uu.net NNTP-Posting-Date: 10 Apr 2001 08:57:42 GMT X-Newsreader: MicroPlanet Gravity v2.30