org.jbox2d.serialization
Interface JbDeserializer

All Known Implementing Classes:
PbDeserializer

public interface JbDeserializer


Nested Class Summary
static interface JbDeserializer.ObjectListener
          Called for each physics object with a tag defined.
 
Method Summary
 org.jbox2d.dynamics.Body deserializeBody(org.jbox2d.dynamics.World argWorld, java.io.InputStream argInput)
          Deserializes a body
 org.jbox2d.dynamics.Fixture deserializeFixture(org.jbox2d.dynamics.Body argBody, java.io.InputStream argInput)
          Deserializes a fixture
 org.jbox2d.dynamics.joints.Joint deserializeJoint(org.jbox2d.dynamics.World argWorld, java.io.InputStream argInput, java.util.Map<java.lang.Integer,org.jbox2d.dynamics.Body> argBodyMap, java.util.Map<java.lang.Integer,org.jbox2d.dynamics.joints.Joint> argJointMap)
          Deserializes a joint
 org.jbox2d.collision.shapes.Shape deserializeShape(java.io.InputStream argInput)
          Deserializes a shape
 org.jbox2d.dynamics.World deserializeWorld(java.io.InputStream argInput)
          Deserializes a world
 void setObjectListener(JbDeserializer.ObjectListener argListener)
          Sets the object listener, which allows the user to process each physics object with a tag to do any sort of custom logic.
 void setUnsupportedListener(UnsupportedListener argListener)
          Sets a listener for unsupported exceptions instead of stopping the whole deserialization process by throwing and exception.
 

Method Detail

setObjectListener

void setObjectListener(JbDeserializer.ObjectListener argListener)
Sets the object listener, which allows the user to process each physics object with a tag to do any sort of custom logic.

Parameters:
argListener -

setUnsupportedListener

void setUnsupportedListener(UnsupportedListener argListener)
Sets a listener for unsupported exceptions instead of stopping the whole deserialization process by throwing and exception.

Parameters:
argListener -

deserializeWorld

org.jbox2d.dynamics.World deserializeWorld(java.io.InputStream argInput)
                                           throws java.io.IOException,
                                                  UnsupportedObjectException
Deserializes a world

Parameters:
argInput -
Returns:
Throws:
java.io.IOException
UnsupportedObjectException - if a read physics object is unsupported by this library
See Also:
setUnsupportedListener(UnsupportedListener)

deserializeBody

org.jbox2d.dynamics.Body deserializeBody(org.jbox2d.dynamics.World argWorld,
                                         java.io.InputStream argInput)
                                         throws java.io.IOException,
                                                UnsupportedObjectException
Deserializes a body

Parameters:
argWorld -
argInput -
Returns:
Throws:
java.io.IOException
UnsupportedObjectException - if a read physics object is unsupported by this library
See Also:
setUnsupportedListener(UnsupportedListener)

deserializeFixture

org.jbox2d.dynamics.Fixture deserializeFixture(org.jbox2d.dynamics.Body argBody,
                                               java.io.InputStream argInput)
                                               throws java.io.IOException,
                                                      UnsupportedObjectException
Deserializes a fixture

Parameters:
argBody -
argInput -
Returns:
Throws:
java.io.IOException
UnsupportedObjectException - if a read physics object is unsupported by this library
See Also:
setUnsupportedListener(UnsupportedListener)

deserializeShape

org.jbox2d.collision.shapes.Shape deserializeShape(java.io.InputStream argInput)
                                                   throws java.io.IOException,
                                                          UnsupportedObjectException
Deserializes a shape

Parameters:
argInput -
Returns:
Throws:
java.io.IOException
UnsupportedObjectException - if a read physics object is unsupported by this library
See Also:
setUnsupportedListener(UnsupportedListener)

deserializeJoint

org.jbox2d.dynamics.joints.Joint deserializeJoint(org.jbox2d.dynamics.World argWorld,
                                                  java.io.InputStream argInput,
                                                  java.util.Map<java.lang.Integer,org.jbox2d.dynamics.Body> argBodyMap,
                                                  java.util.Map<java.lang.Integer,org.jbox2d.dynamics.joints.Joint> argJointMap)
                                                  throws java.io.IOException,
                                                         UnsupportedObjectException
Deserializes a joint

Parameters:
argWorld -
argInput -
argBodyMap -
argJointMap -
Returns:
Throws:
java.io.IOException
UnsupportedObjectException - if a read physics object is unsupported by this library
See Also:
setUnsupportedListener(UnsupportedListener)


Copyright © 2012. All Rights Reserved.