Skip to content

Commit a2861fc

Browse files
authored
BinaryImporter: log messages
1 parent 081dfba commit a2861fc

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

jme3-core/src/plugins/java/com/jme3/export/binary/BinaryImporter.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public final class BinaryImporter implements JmeImporter {
8989
private static final boolean fastRead = ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN;
9090

9191
/**
92-
* Creates a new `BinaryImporter`.
92+
* Creates a new {@code BinaryImporter}.
9393
*/
9494
public BinaryImporter() {
9595
}
@@ -109,8 +109,9 @@ public static boolean canUseFastBuffers(){
109109
}
110110

111111
/**
112-
* Returns a new instance of `BinaryImporter`.
113-
* @return a new `BinaryImporter` instance.
112+
* Returns a new instance of {@code BinaryImporter}.
113+
*
114+
* @return A new {@code BinaryImporter} instance.
114115
*/
115116
public static BinaryImporter getInstance() {
116117
return new BinaryImporter();
@@ -278,11 +279,12 @@ public Savable load(InputStream is, ReadListener listener, ByteArrayOutputStream
278279
bytes += 8;
279280
}
280281

281-
@SuppressWarnings("unused")
282282
int numbIDs = ByteUtils.readInt(bis); // XXX: NOT CURRENTLY USED
283283
int id = ByteUtils.readInt(bis);
284284
bytes += 8;
285-
if (listener != null) listener.readBytes(bytes);
285+
if (listener != null) {
286+
listener.readBytes(bytes);
287+
}
286288

287289
if (baos == null) {
288290
baos = new ByteArrayOutputStream(bytes);
@@ -300,10 +302,11 @@ public Savable load(InputStream is, ReadListener listener, ByteArrayOutputStream
300302

301303
Savable rVal = readObject(id);
302304
if (debug) {
303-
logger.log(Level.INFO, "BinaryImporter Stats:");
304-
logger.log(Level.INFO, "Tags: {0}", numClasses);
305-
logger.log(Level.INFO, "Objects: {0}", numLocs);
306-
logger.log(Level.INFO, "Data Size: {0}", dataArray.length);
305+
logger.log(Level.INFO, "BinaryImporter Stats:" +
306+
"\n * Tags: {0}" +
307+
"\n * Objects: {1}" +
308+
"\n * Data: {2} bytes",
309+
new Object[] {numClasses, numLocs, dataArray.length});
307310
}
308311
dataArray = null;
309312
return rVal;

0 commit comments

Comments
 (0)