473,394 Members | 1,714 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Forcing different Serialization/Externalization for identical references

GG
Hi all,

How would one force a deep reserialization for a collection whose
reference
is already known to be serialized by ObjectOutputStream (without using
custom
mechanisms, of course; in that case there's no question, is there?).

For example, I am trying to serialize a large number (hundreds of
thousands) of rows of a database, that I store as a List. Now, if I do
..clear() and try to serialize again, I would get the same result back
as the first thing I serialized. But if I create a "new" object every
time, I run out of memory pretty fast. Is there a standard way, or
should I roll my own solution?
Jul 17 '05 #1
1 2351
On 13 Jul 2004 21:29:20 -0700, gr****@alum.mit.edu (GG) wrote or
quoted :
How would one force a deep reserialization for a collection whose
reference
is already known to be serialized by ObjectOutputStream (without using
custom
mechanisms, of course; in that case there's no question, is there?).


see reset method. That makes it forget about all the objects earlier
in the stream.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Maurice Asuar | last post by:
Hi all, I got a really bad headache with this exception. I have a class named THECLASS which implements two static methods to provide externalization of the object itself. One method is LOAD...
37
by: Ben | last post by:
Hi, there. Recently I was working on a problem where we want to save generic closures in a data structure (a vector). The closure should work for any data type and any method with pre-defined...
1
by: MattBell | last post by:
I have a root node attribute which contains a name space declaration. I'd like to put a reference onto the front of it (ie: ns1:RootNode) where ns1 is defined as the namespace I'm using. Is...
3
by: Aaron Clamage | last post by:
Hi, I'm not sure that if this is the right forum, but any help would be greatly appreciated. I am porting some java serialization code to c# and I can't figure out the correct way to do it. ...
8
by: Eric Eggermann | last post by:
I'm having a problem with really large file sizes when serializing the classes that describe my little document. There are some circular references which result in the same object getting written...
1
by: Ray Mitchell | last post by:
It is my understanding that as objects are serialized to an output stream the stream remembers which ones have been previously serialized and merely writes a reference to them rather than...
0
by: ChipOne | last post by:
I have a Widget Class with a Parent and Child property of type Widget. When you populate a set of Widgets, you set references to the Parent and Child. I was using binary serialization, which...
3
by: Alexander | last post by:
When i store rule on PC with .NET.SP1 i cant restore them from PC without SP1. An i get this Error: System.Runtime.Serialization.SerializationException: Possible Version mismatch. Type...
2
by: =?ISO-8859-1?Q?=22Andr=E9s_G=2E_Aragoneses_=5B_kno | last post by:
Hello. I have this kind of object: class classA { int x; classA z; public int X { get { return this.x; }
10
by: Atmapuri | last post by:
Hi! I would like to deserialize an object to which other unknown objects hold multiple references. Is it possible to deserialize the object without the need to destroy and recreate it? How? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.