/**
 * 
 */
package com.rana.cache;

import java.beans.XMLDecoder;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.Serializable;

/**
 * @author pramod_rana7
 *
 */
public class CacheRead implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * @param file in which object is written
	 * @throws FileNotFoundException 
	 */
	public CacheRead(File paramFile) throws FileNotFoundException{
		decode =new XMLDecoder(new FileInputStream(paramFile));
	}
	
	public Object readObject(){
		return this.decode.readObject();
	}
	
	public void close(){
		if(this.decode!=null){
			this.decode.close();
			this.decode=null;
		}
	}
	
	/* (non-Javadoc)
	 * @see java.lang.Object#finalize()
	 */
	@Override
	protected void finalize() throws Throwable {
		this.close();
		super.finalize();
	}	

	/** Reading the Object store in a file **/
	XMLDecoder decode;
}

@@ -211,17 +211,45 @@
 rana7%0A *
+ Read data from the xml file
 %0A
-
  */%0Apubl
@@ -360,24 +360,52 @@
 = 1L;%0A%0A%09/**%0A
+%09 * Parametrize Constructor%0A
 %09 * @param f
@@ -594,32 +594,80 @@
 ramFile));%0A%09%7D%0A%09%0A
+%09/**%0A%09 * @return Object read from the file%0A%09 */%0A
 %09public Object r
@@ -717,18 +717,55 @@
 t();%0A%09%7D%0A
-
 %09%0A
+%09/**%0A%09 * Closing the CacheRead %0A%09 */%0A
 %09public 

Update CacheRead.java