Here you can find the source of deserialisasi(String sFile)
Parameter | Description |
---|---|
String | sFile File sumber |
public static Object deserialisasi(String sFile)
//package com.java2s; //License from project: Open Source License import java.io.FileInputStream; import java.io.IOException; import java.io.ObjectInputStream; public class Main { /**// ww w .j a v a 2s . c om * Deserialisasi file (serialized) ke objek * @param String sFile File sumber * @return Object o Objek hasil deserialisasi */ public static Object deserialisasi(String sFile) { Object o = null; try { ObjectInputStream in = new ObjectInputStream( new FileInputStream(sFile)); o = in.readObject(); in.close(); } catch (ClassNotFoundException ex) { System.err.println(ex.getMessage()); } catch (IOException ex) { System.err.println(ex.getMessage()); } return o; } }