solar.impl
Class SerializedAdu

java.lang.Object
  |
  +--solar.impl.SerializedAdu
All Implemented Interfaces:
Adu, java.io.Serializable

public class SerializedAdu
extends java.lang.Object
implements Adu

Wrapper ADU for arbituary serializable object.

Version:
$Id: SerializedAdu.java,v 1.2 2003/09/23 14:03:57 glchen Exp $
Author:
Guanling Chen
See Also:
Serialized Form

Field Summary
protected  java.io.Serializable _obj
           
 
Constructor Summary
SerializedAdu(java.io.Serializable obj)
           
 
Method Summary
static java.lang.Object decodeSerializable(byte[] data)
           
static java.lang.Object decodeSerializable(byte[] data, int offset, int len)
           
static byte[] encodeSerializable(java.io.Serializable obj)
           
 byte[] toBytes()
          Return the byte array format of this ADU.
 java.lang.String toString()
          Return the string format of this ADU.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_obj

protected java.io.Serializable _obj
Constructor Detail

SerializedAdu

public SerializedAdu(java.io.Serializable obj)
Method Detail

toString

public java.lang.String toString()
Description copied from interface: Adu
Return the string format of this ADU.

Specified by:
toString in interface Adu
Overrides:
toString in class java.lang.Object

toBytes

public byte[] toBytes()
Description copied from interface: Adu
Return the byte array format of this ADU.

Specified by:
toBytes in interface Adu

encodeSerializable

public static byte[] encodeSerializable(java.io.Serializable obj)
                                 throws java.lang.Exception
java.lang.Exception

decodeSerializable

public static java.lang.Object decodeSerializable(byte[] data)
                                           throws java.lang.Exception
java.lang.Exception

decodeSerializable

public static java.lang.Object decodeSerializable(byte[] data,
                                                  int offset,
                                                  int len)
                                           throws java.lang.Exception
java.lang.Exception