Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #19194

Re: serializing

Newsgroups comp.lang.java.programmer
Date 2012-10-08 14:58 -0700
References <fe978849-c763-4bfb-a8b1-58ffd7203a24@googlegroups.com>
Message-ID <5023e882-8a0b-4429-8062-096d058081a7@googlegroups.com> (permalink)
Subject Re: serializing
From Lew <lewbloch@gmail.com>

Show all headers | View raw


bob smith wrote:
> Let's say I have this class:
> 
> public class Going_to_be_serialized implements Serializable {
> 	public ArrayList<My_Rectangle> rectangles;
> 	public My_Rectangle cur_rect;
> 
> So, there are four rectangles in "rectangles".
> 
> The "catch" is that cur_rect points to the first rectangle in "rectangles".
> 
> So, will there be five rectangles stored when I serialize this?  Or will
> cur_rect magically point to the first rectangle?

Java's inherent serialization handles cycles in the object graph correctly. It's not very 
space-efficient at doing so. 

GIYF.

-- 
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

serializing bob smith <bob@coolfone.comze.com> - 2012-10-08 12:08 -0700
  Re: serializing Arne Vajhøj <arne@vajhoej.dk> - 2012-10-08 15:15 -0400
    Re: serializing markspace <-@.> - 2012-10-08 16:16 -0700
      Re: serializing Lew <lewbloch@gmail.com> - 2012-10-08 17:06 -0700
        Re: serializing markspace <-@.> - 2012-10-08 19:29 -0700
      Re: serializing Roedy Green <see_website@mindprod.com.invalid> - 2012-10-09 17:27 -0700
        Re: serializing Arne Vajhøj <arne@vajhoej.dk> - 2012-10-09 21:01 -0400
      Re: serializing Arne Vajhøj <arne@vajhoej.dk> - 2012-10-09 21:00 -0400
  Re: serializing Lew <lewbloch@gmail.com> - 2012-10-08 14:58 -0700
    Re: serializing Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2012-10-09 01:59 +0200
      Re: serializing Lew <lewbloch@gmail.com> - 2012-10-08 17:07 -0700
  Re: serializing Roedy Green <see_website@mindprod.com.invalid> - 2012-10-09 02:09 -0700

csiph-web