com.jme3.export.binary
Class BinaryImporter
java.lang.Object
com.jme3.export.binary.BinaryImporter
- All Implemented Interfaces:
- AssetLoader, JmeImporter
public final class BinaryImporter
- extends java.lang.Object
- implements JmeImporter
Field Summary |
static boolean |
debug
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debug
public static boolean debug
BinaryImporter
public BinaryImporter()
getFormatVersion
public int getFormatVersion()
- Description copied from interface:
JmeImporter
- Returns the version number written in the header of the J3O/XML
file.
- Specified by:
getFormatVersion
in interface JmeImporter
- Returns:
- Global version number for the file
canUseFastBuffers
public static boolean canUseFastBuffers()
getInstance
public static BinaryImporter getInstance()
setAssetManager
public void setAssetManager(AssetManager manager)
getAssetManager
public AssetManager getAssetManager()
- Specified by:
getAssetManager
in interface JmeImporter
load
public java.lang.Object load(AssetInfo info)
- Description copied from interface:
AssetLoader
- Loads asset from the given input stream, parsing it into
an application-usable object.
- Specified by:
load
in interface AssetLoader
- Returns:
- An object representing the resource.
load
public Savable load(java.io.InputStream is)
throws java.io.IOException
- Throws:
java.io.IOException
load
public Savable load(java.io.InputStream is,
ReadListener listener)
throws java.io.IOException
- Throws:
java.io.IOException
load
public Savable load(java.io.InputStream is,
ReadListener listener,
java.io.ByteArrayOutputStream baos)
throws java.io.IOException
- Throws:
java.io.IOException
load
public Savable load(java.net.URL f)
throws java.io.IOException
- Throws:
java.io.IOException
load
public Savable load(java.net.URL f,
ReadListener listener)
throws java.io.IOException
- Throws:
java.io.IOException
load
public Savable load(java.io.File f)
throws java.io.IOException
- Throws:
java.io.IOException
load
public Savable load(java.io.File f,
ReadListener listener)
throws java.io.IOException
- Throws:
java.io.IOException
load
public Savable load(byte[] data)
throws java.io.IOException
- Throws:
java.io.IOException
getCapsule
public InputCapsule getCapsule(Savable id)
- Specified by:
getCapsule
in interface JmeImporter
readString
protected java.lang.String readString(java.io.InputStream f,
int length)
throws java.io.IOException
- Throws:
java.io.IOException
readString
protected java.lang.String readString(int length,
int offset)
throws java.io.IOException
- Throws:
java.io.IOException
readObject
public Savable readObject(int id)