org.jboss.util
Class Conversion

java.lang.Object
  extended byorg.jboss.util.Conversion

public class Conversion
extends java.lang.Object


Constructor Summary
Conversion()
           
 
Method Summary
static byte[] toByteArray(java.lang.Object obj)
          Receives an object and converts it into a byte array.
static java.lang.Object toObject(byte[] a)
          Receives a byte array previously returned by a call to toByteArray and retrieves an object from it.
static java.lang.Object toObject(byte[] a, java.lang.ClassLoader cl)
          Receives a classloader and a byte array previously returned by a call to toByteArray and retrieves an object from it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Conversion

public Conversion()
Method Detail

toByteArray

public static byte[] toByteArray(java.lang.Object obj)
Receives an object and converts it into a byte array. Used to embed a JBoss oid into the "reference data" (object id) field of a CORBA reference.


toObject

public static java.lang.Object toObject(byte[] a,
                                        java.lang.ClassLoader cl)
                                 throws java.io.IOException,
                                        java.lang.ClassNotFoundException
Receives a classloader and a byte array previously returned by a call to toByteArray and retrieves an object from it. Used to extract a JBoss oid from the "reference data" (object id) field of a CORBA reference.

Throws:
java.io.IOException
java.lang.ClassNotFoundException

toObject

public static java.lang.Object toObject(byte[] a)
                                 throws java.io.IOException,
                                        java.lang.ClassNotFoundException
Receives a byte array previously returned by a call to toByteArray and retrieves an object from it. Used to extract a JBoss oid from the "reference data" (object id) field of a CORBA reference.

Throws:
java.io.IOException
java.lang.ClassNotFoundException