/Users/lyon/j4p/src/j3d/viewer/SerializeVU.java
|
1 package j3d.viewer;
2
3 /*
4 *
5 * (c) September 1998 by Mauro Marinilli
6 *
7 */
8
9
10 import javax.media.j3d.VirtualUniverse;
11 import java.io.File;
12 import java.io.FileOutputStream;
13 import java.io.IOException;
14 import java.io.ObjectOutputStream;
15
16
17 public class SerializeVU {
18
19
20 public SerializeVU(VirtualUniverse vu, String s) {
21
22 try {
23 File f = new File(vu.toString());
24 FileOutputStream ostream = new FileOutputStream(s);
25 ObjectOutputStream out = new ObjectOutputStream(ostream);
26 out.writeObject(vu);
27 out.close();
28
29 } catch (IOException ie) {
30 System.out.println("deserializing:" + vu.toString() + ie.toString());
31 }
32 }
33
34 }
35
36