|
@@ -34,6 +34,7 @@ package com.jme3.export.binary;
|
|
import com.jme3.asset.AssetManager;
|
|
import com.jme3.asset.AssetManager;
|
|
import com.jme3.export.FormatVersion;
|
|
import com.jme3.export.FormatVersion;
|
|
import com.jme3.export.JmeExporter;
|
|
import com.jme3.export.JmeExporter;
|
|
|
|
+import com.jme3.export.OutputCapsule;
|
|
import com.jme3.export.Savable;
|
|
import com.jme3.export.Savable;
|
|
import com.jme3.export.SavableClassUtil;
|
|
import com.jme3.export.SavableClassUtil;
|
|
import com.jme3.math.FastMath;
|
|
import com.jme3.math.FastMath;
|
|
@@ -147,7 +148,7 @@ public class BinaryExporter implements JmeExporter {
|
|
protected int aliasCount = 1;
|
|
protected int aliasCount = 1;
|
|
protected int idCount = 1;
|
|
protected int idCount = 1;
|
|
|
|
|
|
- protected IdentityHashMap<Savable, BinaryIdContentPair> contentTable
|
|
|
|
|
|
+ final private IdentityHashMap<Savable, BinaryIdContentPair> contentTable
|
|
= new IdentityHashMap<>();
|
|
= new IdentityHashMap<>();
|
|
|
|
|
|
protected HashMap<Integer, Integer> locationTable
|
|
protected HashMap<Integer, Integer> locationTable
|
|
@@ -323,12 +324,12 @@ public class BinaryExporter implements JmeExporter {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- protected String getChunk(BinaryIdContentPair pair) {
|
|
|
|
|
|
+ private String getChunk(BinaryIdContentPair pair) {
|
|
return new String(pair.getContent().bytes, 0, Math.min(64, pair
|
|
return new String(pair.getContent().bytes, 0, Math.min(64, pair
|
|
.getContent().bytes.length));
|
|
.getContent().bytes.length));
|
|
}
|
|
}
|
|
|
|
|
|
- protected int findPrevMatch(BinaryIdContentPair oldPair,
|
|
|
|
|
|
+ private int findPrevMatch(BinaryIdContentPair oldPair,
|
|
ArrayList<BinaryIdContentPair> bucket) {
|
|
ArrayList<BinaryIdContentPair> bucket) {
|
|
if (bucket == null)
|
|
if (bucket == null)
|
|
return -1;
|
|
return -1;
|
|
@@ -364,7 +365,7 @@ public class BinaryExporter implements JmeExporter {
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public BinaryOutputCapsule getCapsule(Savable object) {
|
|
|
|
|
|
+ public OutputCapsule getCapsule(Savable object) {
|
|
return contentTable.get(object).getContent();
|
|
return contentTable.get(object).getContent();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -419,7 +420,7 @@ public class BinaryExporter implements JmeExporter {
|
|
return bytes;
|
|
return bytes;
|
|
}
|
|
}
|
|
|
|
|
|
- protected BinaryIdContentPair generateIdContentPair(BinaryClassObject bco) {
|
|
|
|
|
|
+ private BinaryIdContentPair generateIdContentPair(BinaryClassObject bco) {
|
|
BinaryIdContentPair pair = new BinaryIdContentPair(idCount++,
|
|
BinaryIdContentPair pair = new BinaryIdContentPair(idCount++,
|
|
new BinaryOutputCapsule(this, bco));
|
|
new BinaryOutputCapsule(this, bco));
|
|
return pair;
|
|
return pair;
|