com.jme.util.export.binary
Class BinaryImporter

java.lang.Object
  extended by com.jme.util.export.binary.BinaryImporter
All Implemented Interfaces:
JMEImporter

public class BinaryImporter
extends java.lang.Object
implements JMEImporter

Author:
Joshua Slack

Field Summary
protected  int aliasWidth
           
protected  java.util.IdentityHashMap<Savable,BinaryInputCapsule> capsuleTable
           
protected  java.util.HashMap<java.lang.String,BinaryClassObject> classes
           
protected  java.util.HashMap<java.lang.Integer,Savable> contentTable
           
protected  byte[] dataArray
           
static boolean debug
           
protected  java.util.HashMap<java.lang.Integer,java.lang.Integer> locationTable
           
 
Constructor Summary
BinaryImporter()
           
 
Method Summary
 BinaryInputCapsule getCapsule(Savable id)
           
static BinaryImporter getInstance()
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classes

protected java.util.HashMap<java.lang.String,BinaryClassObject> classes

contentTable

protected java.util.HashMap<java.lang.Integer,Savable> contentTable

capsuleTable

protected java.util.IdentityHashMap<Savable,BinaryInputCapsule> capsuleTable

locationTable

protected java.util.HashMap<java.lang.Integer,java.lang.Integer> locationTable

debug

public static boolean debug

dataArray

protected byte[] dataArray

aliasWidth

protected int aliasWidth
Constructor Detail

BinaryImporter

public BinaryImporter()
Method Detail

getInstance

public static BinaryImporter getInstance()

load

public Savable load(java.io.InputStream is)
             throws java.io.IOException
Specified by:
load in interface JMEImporter
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
Specified by:
load in interface JMEImporter
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
Specified by:
load in interface JMEImporter
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 BinaryInputCapsule 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)