Here you can find the source of saveAllPlaying(Object obj, String path)
Parameter | Description |
---|---|
obj | a parameter |
path | a parameter |
public static void saveAllPlaying(Object obj, String path)
//package com.java2s; //License from project: Open Source License import java.io.FileOutputStream; import java.io.ObjectOutputStream; public class Main { /**/* w ww . j a v a2s . co m*/ * Used for saving the ParkourSessions. * Thanks to Tomsik68 for this code. * * @param obj * @param path */ public static void saveAllPlaying(Object obj, String path) { try { ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(path)); oos.writeObject(obj); oos.flush(); oos.close(); } catch (Exception ex) { ex.printStackTrace(); } } }