|
|
@ -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 { |
|
|
|
|
|
|
|
return save(object, fos); |
|
|
|
|
|
|
|
} finally { |
|
|
|
|
|
|
|
if (fos != null) { |
|
|
|
fos.close(); |
|
|
|
fos.close(); |
|
|
|
return rVal; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public BinaryOutputCapsule getCapsule(Savable object) { |
|
|
|
public BinaryOutputCapsule getCapsule(Savable object) { |
|
|
|