com.jme3.export.binary
Class BinaryImporter

java.lang.Object
  extended by 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
           
 
Constructor Summary
BinaryImporter()
           
 
Method Summary
static boolean canUseFastBuffers()
           
 AssetManager getAssetManager()
           
 InputCapsule getCapsule(Savable id)
           
 int getFormatVersion()
          Returns the version number written in the header of the J3O/XML file.
static BinaryImporter getInstance()
           
 java.lang.Object load(AssetInfo info)
          Loads asset from the given input stream, parsing it into an application-usable object.
 Savable load(byte[] data)
           
 Savable load(java.io.File f)
           
 Savable load(java.io.File f, ReadListener listener)
           
 Savable load(java.io.InputStream is)
           
 Savable load(java.io.InputStream is, ReadListener listener)
           
 Savable load(java.io.InputStream is, ReadListener listener, java.io.ByteArrayOutputStream baos)
           
 Savable load(java.net.URL f)
           
 Savable load(java.net.URL f, ReadListener listener)
           
 Savable readObject(int id)
           
protected  java.lang.String readString(java.io.InputStream f, int length)
           
protected  java.lang.String readString(int length, int offset)
           
 void setAssetManager(AssetManager manager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Constructor Detail

BinaryImporter

public BinaryImporter()
Method Detail

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)