|
|
@ -327,14 +327,18 @@ public class BinaryExporter implements JmeExporter { |
|
|
|
|
|
|
|
|
|
|
|
public boolean save(Savable object, File f) throws IOException { |
|
|
|
public boolean save(Savable object, File f) throws IOException { |
|
|
|
File parentDirectory = f.getParentFile(); |
|
|
|
File parentDirectory = f.getParentFile(); |
|
|
|
if(parentDirectory != null && !parentDirectory.exists()) { |
|
|
|
if (parentDirectory != null && !parentDirectory.exists()) { |
|
|
|
parentDirectory.mkdirs(); |
|
|
|
parentDirectory.mkdirs(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FileOutputStream fos = new FileOutputStream(f); |
|
|
|
FileOutputStream fos = new FileOutputStream(f); |
|
|
|
boolean rVal = save(object, fos); |
|
|
|
try { |
|
|
|
fos.close(); |
|
|
|
return save(object, fos); |
|
|
|
return rVal; |
|
|
|
} finally { |
|
|
|
|
|
|
|
if (fos != null) { |
|
|
|
|
|
|
|
fos.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public BinaryOutputCapsule getCapsule(Savable object) { |
|
|
|
public BinaryOutputCapsule getCapsule(Savable object) { |
|
|
|