Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Serialization and deserialization
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Bhavya
Serialization and deserialization
1 Answer(s)      6 years and 7 months ago
Posted in : Java Beginners


I am learning java these days... thread and we want that when the first thread is done with the serialization it should notify the second thread that serialization is done and it can initiate


Advertisement
View Answers

April 14, 2008 at 7:18 PM


Hi


import java.io.*;

public class DeserializingExample{

public static void main(String[] args) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter File name : ");

String file = in.readLine();

System.out.print("Enter extention : ");

String ext = in.readLine();

String filename = file + "." + ext;

File f = new File(filename);

try{

ObjectInputStream obj = new ObjectInputStream(new FileInputStream(f));
System.out.println("The text : "+ obj.readObject());
obj.close();
System.out.println("Deserializing Operation Completly Successfully.");

}

catch(ClassNotFoundException e){

System.out.println(e.getMessage());

}

catch(FileNotFoundException fe){

System.out.println("File not found ");

}

}

}

-----------------------------------

Read for more information,

http://www.roseindia.net/java/example/java/io/


Related Tutorials/Questions & Answers:
Serialization and deserialization - Java Beginners
Serialization and deserialization  I am learning java these days... thread and we want that when the first thread is done with the serialization it should notify the second thread that serialization is done and it can initiate
Serialization
Serialization  hello What is serialization?   Hello, In Serialization we can save the state of an object by converting it to a byte stream
Advertisements
serialization of objects
serialization of objects  example for serialization plz
serialization concept
serialization concept  what is the exact purpose of serialization in detail
java serialization
java serialization  java serialization
Java serialization
Java serialization  What is the common usage of serialization
serializable & serialization
serializable & serialization  what is the difference between serializable and serialization in java
Java Interview Questions - Page 12
;    Question: What is Serialization and deserialization?  Answer: Serialization is the process of writing the state of an object to a byte stream. Deserialization is the process
Serialization - Java Interview Questions
Serialization Interface  I am a beginner in java.. What is serialization? what happens if we implement Serialization interface? Thanks in advance
Serialization in java
Serialization in java In this section you will learn about serialization in java. Serialization is the process of writing the state of the object... method for serialization and desalinization of object
Object serialization - Java Beginners
Object serialization  Design classes for Currency, Rupee, and Dollar. Write a program that randomly generates Rupee and Dollar objects and write them into a file using object serialization. Write another program to read
What is Transient variable in Java
by serialization mechanism. Serialization mechanism works in the following way... also be brought back to the actual state of bytes using deserialization. Serialization is used in the networking programming where an object must
What happens to the static fields of a class during serialization?
What happens to the static fields of a class during serialization?   What happens to the static fields of a class during serialization?   Hi, Here is the answer, There are three exceptions in which serialization
Java Serialization
Java Serialization In this section, you will learn how to serialize... as Object Serialization. And the recreation of object into the memory from this sequence of byte, is known as Deserialization. Serialized object can be write
Serializable Exception
Serialization is the process of writing an class object that ... Of Serialization 1)Serialization is used in various Java Technologies such as Enterprise... no message. class implements serialization or extending class that also implements
java - Java Interview Questions
java  what is serialization and deserialization?   Hi Friend, The process of transforming an in-memory object to a byte stream is called as Serialization. Deserialization is the inverse process of reconstructing
Java Interview Questions 3
serialization tools that your class is serializable. Question: . How many... interface, you have a complete control over your class's serialization
Java Input/Output Examples
, serialization, and the file system. Here we are giving a long list of examples which
Transient Java Keyword
to learn about serialization in java. Serialization is used to save the state of object by JVM and during deserialization it is recovered. Serialization save...? Transient keyword provide you a control on serialization process in java and allow
Core Java Interview Question, Interview Question
in. Programs that perform serialization and deserialization have to write and read...;     Question: What is serialization ?  Answer: Serialization is the process of writing complete state of java object
Deserializing an Object in java
;  Introduction The opposite operation of the serialization is called deserialization i.e. to extract the data from a series of bytes is s known as deserialization which is also called inflating or unmarshalling
XMLParse
XMLParse       XMLParse does simple deserialization of XML to JavaScript objects like Compatibility Read full Description
Serializing an Object in Java
this example. CLICK HERE TO SEE THE SERIALIZATION & DESERIALIZATION COMPLETE...;    Introduction Serialization is the process... example shows the implementation of serialization to an object. This program takes
Serlization
Serlization  give me real time example of serialization
Serializaiton - Java Interview Questions
Serializaiton  What is Serialization? difference between string and string buffer? what is static?   What is serialization, serialization code in Java and serialization example Java Please visit the following
Core Java Interview Question, Interview Question
are interested in. Programs that perform serialization and deserialization have... is serialization ?  Answer: Serialization is the process of writing complete state
core java
core java  Hi, can any one expain me serialization,Deseralization and exterenalization in core java
Advertisements
 

 

 

DMCA.com