jGuru
Register Email     Password Forgot your
password?
HOME FAQS FORUMS DOWNLOADS ARTICLES PEERSCOPE LEARN

  Search   jGuru Search Help

View:
Serialization FAQ Home Page

FAQ Manager is guru Tim Rohaly PREMIUM.

Serialization allows you to create a JVM-independent binary representation of an in-memory Java object. This external representation may be used to transfer or store the object and to recreate it in another JVM.

What's New

What is the easiest way to convert my java beans into xml?
Java:API:JavaBeans, Java:Language, Java:API:Serialization
Davanum Srinivas PREMIUM, Mar 30, 2002
Use java.beans.XMLEncoder. XMLEncoder e = new XMLEncoder( new BufferedOutputStream( new FileOutputStre...
How can i implement Serializable with my own Custom Data Format?
Java:Language, Java:API:Serialization
Davanum Srinivas PREMIUM, Feb 28, 2002
import java.io.*; public class CustomDataExample implements Serializable { transient int dimension; transient int thearray[][]; /** ...
What's the serialver syntax to get the serialVersionUID of an array?
Java:API:IO, Java:API:Serialization
John Zukowski PREMIUM, Aug 4, 2001
You need to pass in the array "type" after the [ character, and before a ; character. If the type is a class, add the letter L and the fully qualified...

What does the Serializable interface do?
Java:API:Serialization
Tim Rohaly PREMIUM, Jul 13, 2001
Serializable is a tagging interface; it prescribes no methods. It serves to assign the Serializable data type to the tagged class and to identify the...
Where can I learn (more) about Java RMI (Remote Method Invocation)?
Java:API:Security, Java:Language, Java:API:Serialization, General:FAQs
John Mitchell PREMIUM, May 30, 2001
Check out the jGuru RMI FAQ.
Where can I learn (more) about Java's support asynchronous and publish/subscribe messaging using JMS (Java Message Service)?
Java:API:RMI, Java:API:JNDI, Java:API:Security, Java:Language, Distributed computing:CORBA, Distributed computing:Transactions, Java:API:Serialization, Java:API:Networking, Java:API:EJB:2.0, General:FAQs, Tools:AppServer
John Mitchell PREMIUM, May 30, 2001
Check out the jGuru JMS FAQ.
Where can I learn (more) about Java's I/O (input/output, IO) capabilities?
Tools:ANTLR:Recognition, Languages:Markup:XML, Java:API:Security, Java:Language, Java:API:Serialization, Java:API:Networking, Java:API:Servlets:Files, Java:API:Media:Image I/O, General:FAQs, Java:API:Internationalization:Input/Output
John Mitchell PREMIUM, May 30, 2001
Check out the jGuru IO FAQ.
How can I serialize a JavaMail Message?
Java:API:JavaMail, Java:API:Serialization
John Zukowski PREMIUM, Mar 6, 2001
You can't. As messages are associated with folders which are associated with sessions, Message objects are considered not serializable. Like threads and...
What is the correct order of ObjectInputStream/ObjectOutputStream creation on the client and the server when sending objects over a network connection?
Java:API:IO, Java:API:Serialization
Tim Rohaly PREMIUM, Feb 19, 2001
According to the API documentation for ObjectInputStream's constructor: The stream header containing the magic number and version number are read...
How can I instantiate a serialized JavaBean into an applet if my .ser file is in jar or zip archive?
Java:API:JavaBeans, Java:API:Serialization
John Zukowski PREMIUM, Jan 25, 2001
The Beans.instantiate() method needs to be passed the proper classloader. Just passing in null is not sufficient for an applet. For instance, if your class...
What is the role of serialization in EJB?
Java:API:EJB, Java:API:Serialization
Tom McClure, Jan 13, 2001
A big part of EJB is that it is a framework for underlying RMI: remote method invocation. You're invoking methods remotely from JVM space 'A' on objects...
How can I determine the byte length of an object that I serialize to a stream?
Java:API:IO, Java:API:Serialization
Tim Rohaly PREMIUM, Nov 28, 2000
There are a couple of things you can do. First, you can pipe the ObjectOutputStream into a ByteArrayOutputStream, then examine the length of the byte...
Are there any limits on the size of a serialized object?
Java:API:Serialization
Dane Foster, Nov 15, 2000
There are limits, but in practice you shouldn't encounter them. You are limited by the amount of memory your JVM can allocate to the creation and maintainence...
Are classes that implement Serializable required to have no-argument constructors?
Java:Language:Classes, Java:Language:Declarations, Java:Language:Semantics, Java:API:Serialization
Tim Rohaly PREMIUM, Nov 12, 2000
No. This is a common misconception. The deserialization process does not use the object's constructor - the object is instantiated without a constructor and...
What's the difference between the SUID (Stream Unique IDentifier) and the private static member serialVersionUID?
Java:API:Serialization
Tim Rohaly PREMIUM, Oct 25, 2000
The SUID is one of a number of things that the serialization protocol writes to the stream in addition to the serialized object (other things include...
Is there any way to save the state of an object of a class which does not implement Serializable or Extenalizable?.
Java:API:Serialization
swarraj kulkarni, Oct 3, 2000
Yes. You will have to write the value of each and every instance variable into the persistent storage. If there are 100 variables, you will have to store...
Is there any significant performance gain in serialization from declaring instance variables as transient?
Java:API:Serialization
Tim Rohaly PREMIUM, Sep 18, 2000
Serialization saves only the state of the object. If some instance variables don't contribute to the state, there's no sense in spending the extra time...
Are methods also serialized along with the data members?
Java:API:Serialization
Tim Rohaly PREMIUM, Sep 18, 2000
No. Method bodies do not hold any information on the state of an object, so they are not needed in order to save or restore the state.
Where can I find the official documentation of the Sun Java SDK tools?
Java:API:RMI, Java:API:CORBA:Java IDL, Java:API:CORBA:RMI/IIOP, Java:Language, Tools, Tools:Misc, JDK, JDK:1.3, Vendors:Sun, Java:API:Doclet, Java:API:Serialization
John Mitchell PREMIUM, Aug 30, 2000
You can find the official Sun documentation for all of the tools in the Java 2 SDK including javac, java, javadoc, appletviewer, jar, jdb, javah, javap,...
Why should I implement readObject() even if I don't implement writeObject()?
Java:API:Serialization
John Mitchell PREMIUM, Aug 6, 2000
It's a good idea to think of deserialization as yet another public constructor. So, if you have any post-construction activities that you want your object...
« previous beginning next »


Ask A Question



Related Links

Serialization Forum

Serialization specification

Sun's Java Tutorial

Wish List
Features
About jGuru
Contact Us