You can use Externalizable as well as any other class that extends Serializable (hurrah for OO).

If you put a non-Serializable object into an array and try to serialize bad things will happen (same thing with Collections or if you define a class as Serializable and then create non-Serializable members).

Good rule of thumb: don't serialize anything that's isn't a Serializable object.

BAL

From: "Mark Galbreath" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Subject: RE: [OT] Not spam...I swear--
Date: Tue, 21 Jan 2003 15:49:13 -0500

You can also use the Externalizable interface as well as place any object in
an array and serialize the array.

Mark

-----Original Message-----
From: Brian Lee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 21, 2003 2:44 PM
To: [EMAIL PROTECTED]
Subject: RE: [OT] Not spam...I swear--


Only objects that implement java.io.Serializable should be serialized.

Although it might be possible to serialize a class that doesn't implement
Serializable, the interface exists for a reason. Use it to flag that your
class is safe to be serialized.

BAL

>From: "Mark Galbreath" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: [OT] Not spam...I swear--
>Date: Tue, 21 Jan 2003 14:30:30 -0500
>
>He was probably confusing serializable with default synchronization.
>Any Java object can be serialized.
>
>-----Original Message-----
>From: Attila Szegedi [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 21, 2003 12:49 PM
>
>Wrong. Hashtables are serializable just fine.
>
>Attila.
>
>----- Original Message -----
>From: "NoSect" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>
> > Vectors are also serialized....hashtables not.
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

_________________________________________________________________
The new MSN 8 is here: Try it free* for 2 months http://join.msn.com/?page=dept/dialup


--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to