| 3 | import java.io.*; |
| 4 | |
| 5 | public class SerializeUtil { |
| 6 | |
| 7 | public static void writeObjectToFile(Object obj,String fileName) throws Exception { |
| 8 | ObjectOutputStream outputStream = new ObjectOutputStream(new FileOutputStream(fileName)); |
| 9 | outputStream.writeObject(obj); |
| 10 | outputStream.close(); |
| 11 | } |
| 12 | public static void readFileObject(String fileName) throws Exception { |
| 13 | ObjectInputStream ois = new ObjectInputStream(new FileInputStream(fileName)); |
| 14 | Object o = ois.readObject(); |
| 15 | } |
| 16 | } |
nothing calls this directly
no outgoing calls
no test coverage detected