|
@@ -168,7 +168,7 @@ public class BinaryExporter implements JmeExporter {
|
|
|
return new BinaryExporter();
|
|
|
}
|
|
|
|
|
|
- public boolean save(Savable object, OutputStream os) throws IOException {
|
|
|
+ public void save(Savable object, OutputStream os) throws IOException {
|
|
|
// reset some vars
|
|
|
aliasCount = 1;
|
|
|
idCount = 1;
|
|
@@ -286,7 +286,7 @@ public class BinaryExporter implements JmeExporter {
|
|
|
out = null;
|
|
|
os = null;
|
|
|
|
|
|
- if (debug ) {
|
|
|
+ if (debug) {
|
|
|
logger.fine("Stats:");
|
|
|
logger.log(Level.FINE, "classes: {0}", classNum);
|
|
|
logger.log(Level.FINE, "class table: {0} bytes", classTableSize);
|
|
@@ -294,8 +294,6 @@ public class BinaryExporter implements JmeExporter {
|
|
|
logger.log(Level.FINE, "location table: {0} bytes", locationTableSize);
|
|
|
logger.log(Level.FINE, "data: {0} bytes", location);
|
|
|
}
|
|
|
-
|
|
|
- return true;
|
|
|
}
|
|
|
|
|
|
protected String getChunk(BinaryIdContentPair pair) {
|
|
@@ -325,7 +323,7 @@ public class BinaryExporter implements JmeExporter {
|
|
|
return bytes;
|
|
|
}
|
|
|
|
|
|
- public boolean save(Savable object, File f) throws IOException {
|
|
|
+ public void save(Savable object, File f) throws IOException {
|
|
|
File parentDirectory = f.getParentFile();
|
|
|
if (parentDirectory != null && !parentDirectory.exists()) {
|
|
|
parentDirectory.mkdirs();
|
|
@@ -333,11 +331,9 @@ public class BinaryExporter implements JmeExporter {
|
|
|
|
|
|
FileOutputStream fos = new FileOutputStream(f);
|
|
|
try {
|
|
|
- return save(object, fos);
|
|
|
+ save(object, fos);
|
|
|
} finally {
|
|
|
- if (fos != null) {
|
|
|
- fos.close();
|
|
|
- }
|
|
|
+ fos.close();
|
|
|
}
|
|
|
}
|
|
|
|