🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TreeMap serialization

#546
From: George
Date: Tue, 03 Jun 2003 15:38
25 lines
1948 bytes
By reflection, I find that java.util.TreeMap has the following fields

0     comparator             java.util.Comparator
1     root                        java.util.TreeMap$Entry      transient
2     size                         int
transient
3     modCount               int
transient
4     entrySet                  java.util.Set
transient
5     RED                       boolean                                final
static
6     BLACK                 boolean                                final
static
7     serialVersionUID    long                                    final
static

Except for the comparator field (field 0), everything else is either
transient or static (which as I understand are modifiers ignored by
serialization).  So how does serialization work?

I ask because I am trying to write a class to store the contents of a given
object in XML and I'm not getting any data to store for TreeMaps.

TIA.
Technical Details
Message-ID: <3edcc0f4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,d5d05c76cc28ee2b,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2003-06-03 08:39:45 PST
From: "George" <geo54321@hotmail.com>
Newsgroups: borland.public.jbuilder.java.api
Subject: TreeMap serialization
Date: Tue, 3 Jun 2003 11:38:09 -0400
Lines: 27
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 65.209.76.133
Message-ID: <3edcc0f4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1054654708 65.209.76.133 (3 Jun 2003 08:38:28 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail