.. | .. |
---|
4062 | 4062 | } |
---|
4063 | 4063 | } |
---|
4064 | 4064 | } |
---|
| 4065 | + |
---|
4065 | 4066 | LoadGFDThread loadGFDThread; |
---|
4066 | 4067 | |
---|
4067 | 4068 | void ReadGFD(String fullname, iCallBack cb) |
---|
.. | .. |
---|
4082 | 4083 | try |
---|
4083 | 4084 | { |
---|
4084 | 4085 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4085 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4086 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
| 4087 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
4086 | 4088 | |
---|
4087 | 4089 | readobj = (Object3D) p.readObject(); |
---|
4088 | 4090 | istream.close(); |
---|
.. | .. |
---|
4090 | 4092 | readobj.ResetDisplayList(); |
---|
4091 | 4093 | } catch (Exception e) |
---|
4092 | 4094 | { |
---|
4093 | | - e.printStackTrace(); |
---|
| 4095 | + //e.printStackTrace(); |
---|
| 4096 | + try |
---|
| 4097 | + { |
---|
| 4098 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
| 4099 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4100 | + |
---|
| 4101 | + readobj = (Object3D) p.readObject(); |
---|
| 4102 | + istream.close(); |
---|
| 4103 | + |
---|
| 4104 | + readobj.ResetDisplayList(); |
---|
| 4105 | + } catch (Exception e2) |
---|
| 4106 | + { |
---|
| 4107 | + e2.printStackTrace(); |
---|
| 4108 | + } |
---|
4094 | 4109 | } |
---|
4095 | 4110 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
---|
4096 | 4111 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
---|
.. | .. |
---|
4294 | 4309 | try |
---|
4295 | 4310 | { |
---|
4296 | 4311 | FileOutputStream ostream = new FileOutputStream(lastname); |
---|
4297 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 4312 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4313 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4298 | 4314 | |
---|
4299 | 4315 | p.writeObject(copy); |
---|
4300 | 4316 | p.flush(); |
---|
4301 | 4317 | |
---|
| 4318 | + zstream.close(); |
---|
4302 | 4319 | ostream.close(); |
---|
4303 | 4320 | |
---|
4304 | 4321 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4308 | 4325 | { |
---|
4309 | 4326 | } |
---|
4310 | 4327 | } |
---|
| 4328 | + |
---|
4311 | 4329 | String lastname; |
---|
4312 | 4330 | |
---|
4313 | 4331 | void saveAs() |
---|
.. | .. |
---|
4417 | 4435 | try |
---|
4418 | 4436 | { |
---|
4419 | 4437 | FileOutputStream ostream = new FileOutputStream(filename); |
---|
4420 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
4421 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
---|
| 4438 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4439 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4422 | 4440 | |
---|
4423 | 4441 | Object3D objectparent = obj.parent; |
---|
4424 | 4442 | obj.parent = null; |
---|
.. | .. |
---|
4435 | 4453 | p.writeObject(object); |
---|
4436 | 4454 | p.flush(); |
---|
4437 | 4455 | |
---|
| 4456 | + zstream.close(); |
---|
4438 | 4457 | ostream.close(); |
---|
4439 | | - // zstream.close(); |
---|
4440 | 4458 | |
---|
4441 | 4459 | // group.selection.get(0).parent = parent; |
---|
4442 | 4460 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|