|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.discovery.base.DiscHelper
public class DiscHelper
Discovery Helper. Convert objects to bytes and vice versa.
| Constructor Summary | |
|---|---|
DiscHelper()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
bytesToObject(byte[] bytes)
Gets DiscEvenet, DiscMessage, or DiscGreeting from bytes array. |
static byte[] |
objectToBytes(java.lang.Object obj)
Construct a byte[] containing type info about a DiscMessage object to be sent, plus the content of this message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiscHelper()
| Method Detail |
|---|
public static byte[] objectToBytes(java.lang.Object obj)
throws java.io.IOException
obj - Object to be send. Only supported DiscMessage objects.
java.io.IOException - Could not create an ObjectOutputStream to write into the
underlying ByteArrayOutputStream.
public static java.lang.Object bytesToObject(byte[] bytes)
throws java.io.IOException,
java.lang.ClassNotFoundException
DiscEvenet, DiscMessage, or DiscGreeting from bytes array.
bytes - byte[] containing a received message
java.io.IOException - Could not create an ObjectInputStream to read in it
java.lang.ClassNotFoundException - Class of a serialized object cannot be found
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||