Ahh, transient. I've seen that keyword but I don't have any idea what it
does. I did try Serializeable first, but I didn't know how to get it to
ingnore 'proxy'. Can you point me towards more info on the Transient
keyword? Thanks!
-----Original Message-----
From: Allan MacKinnon [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 12:00 PM
To: Josh Howe
Subject: Re: Externalizable problem
Josh Howe wrote:
>
> So I made CincoModel public, and now it works. Is there any disadvantage
to
> this aproach, is it better to provide my own no-arg constructor and not
make
> my class public? Thanks again.
>
the primary concern with Externalizable is that the read/write methods
are public as well as the no-arg constructor. if you have security
concerns then this could be a problem.
the alternative is to use Serializable and mark 'proxy' as being
transient. you wouldn't need to write any read/write marshaling
methods or declare the class public.
you might want to check out the Java Object Serialization Specification.
I think there is a .pdf version on Sun's website. It's terse and
tells you all you need to know. I've dug through the ObjectOutputStream
code and it does a _huge_ amount of work to make sure you have to
do almost nothing but mark something as java.io.Serializable. It's
awesome for saving/restoring gui stuff and other small chunks but blows
for saving/restoring jillions of little objects because of the overhead.
--
Allan MacKinnon
[EMAIL PROTECTED]
Boston, MA
_______________________________________________
Swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/swing