com.distinct.rpc
Class XDRObj

java.lang.Object
  |
  +--com.distinct.rpc.XDRObj

public class XDRObj
extends java.lang.Object

See Also:
XDRStream

Constructor Summary
XDRObj()
           
 
Method Summary
static boolean obj_decode_boolean(java.lang.Object Obj)
          Decodes a boolean.
static char obj_decode_char(java.lang.Object Obj)
          Decodes a character.
static double obj_decode_double(java.lang.Object Obj)
          Decodes a double.
static float obj_decode_float(java.lang.Object Obj)
          Decodes a float.
static int obj_decode_int(java.lang.Object Obj)
          Decodes an integer.
static long obj_decode_long(java.lang.Object Obj)
          Decodes a long.
static byte[] obj_decode_opaque(java.lang.Object Obj, int len)
          Decodes a opaque data with a fixed length.
static short obj_decode_short(java.lang.Object Obj)
          Decodes a short.
static java.lang.String obj_decode_String(java.lang.Object Obj)
          Decodes a String with a variable length.
static java.lang.String obj_decode_String(java.lang.Object Obj, int len)
          Decodes a String with a fixed length.
static java.lang.Object obj_encode_boolean(boolean x)
          Encodes a boolean.
static java.lang.Object obj_encode_char(char x)
          Encodes a character.
static java.lang.Object obj_encode_double(double data)
          Encodes a double.
static java.lang.Object obj_encode_float(float data)
          Encodes a float.
static java.lang.Object obj_encode_int(int x)
          Encodes an integer.
static java.lang.Object obj_encode_long(long x)
          Encodes a long.
static java.lang.Object obj_encode_opaque(byte[] b, int len)
          Encodes opaque data with a fixed length.
static java.lang.Object obj_encode_short(short x)
          Encodes a short.
static java.lang.Object obj_encode_String(java.lang.String s)
          Encodes a String with a variable length.
static java.lang.Object obj_encode_String(java.lang.String s, int len)
          Encodes a String with a fixed length.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XDRObj

public XDRObj()
Method Detail

obj_encode_int

public static java.lang.Object obj_encode_int(int x)
Encodes an integer.

Parameters:
x - The integer to be encoded.

obj_decode_int

public static int obj_decode_int(java.lang.Object Obj)
                          throws RPCError
Decodes an integer.

Returns:
The decoded integer.
Throws:
RPCError - When the calls fails for any reason.

obj_encode_long

public static java.lang.Object obj_encode_long(long x)
Encodes a long.

Parameters:
x - The long to be encoded.

obj_decode_long

public static long obj_decode_long(java.lang.Object Obj)
                            throws RPCError
Decodes a long.

Returns:
The decoded long.
Throws:
RPCError - When the calls fails for any reason.

obj_encode_short

public static java.lang.Object obj_encode_short(short x)
Encodes a short.

Parameters:
x - The short to be encoded.

obj_decode_short

public static short obj_decode_short(java.lang.Object Obj)
                              throws RPCError
Decodes a short.

Returns:
The decoded short.
Throws:
RPCError - When the calls fails for any reason.

obj_encode_char

public static java.lang.Object obj_encode_char(char x)
Encodes a character.

Parameters:
x - The character to be encoded.

obj_decode_char

public static char obj_decode_char(java.lang.Object Obj)
                            throws RPCError
Decodes a character.

Returns:
The decoded character.
Throws:
RPCError - When the calls fails for any reason.

obj_encode_boolean

public static java.lang.Object obj_encode_boolean(boolean x)
Encodes a boolean.

Parameters:
x - The boolean to be encoded.

obj_decode_boolean

public static boolean obj_decode_boolean(java.lang.Object Obj)
                                  throws RPCError
Decodes a boolean.

Returns:
The decoded boolean.
Throws:
RPCError - When the calls fails for any reason.

obj_encode_float

public static java.lang.Object obj_encode_float(float data)
Encodes a float.

Parameters:
data - The float to be encoded.

obj_decode_float

public static float obj_decode_float(java.lang.Object Obj)
                              throws RPCError
Decodes a float.

Returns:
The decoded float.
Throws:
RPCError - When the calls fails for any reason.

obj_encode_double

public static java.lang.Object obj_encode_double(double data)
Encodes a double.

Parameters:
data - The double to be encoded.

obj_decode_double

public static double obj_decode_double(java.lang.Object Obj)
                                throws RPCError
Decodes a double.

Returns:
The decoded double.
Throws:
RPCError - When the calls fails for any reason.

obj_encode_String

public static java.lang.Object obj_encode_String(java.lang.String s)
Encodes a String with a variable length.

Parameters:
s - The String to be encoded.

obj_decode_String

public static java.lang.String obj_decode_String(java.lang.Object Obj)
                                          throws RPCError
Decodes a String with a variable length.

Parameters:
Obj - The Object that contains the data.
Returns:
The String .
Throws:
RPCError - When the calls fails for any reason.

obj_encode_String

public static java.lang.Object obj_encode_String(java.lang.String s,
                                                 int len)
Encodes a String with a fixed length.

Parameters:
s - The String to be encoded.
len - The max length of the encoded string.

obj_decode_String

public static java.lang.String obj_decode_String(java.lang.Object Obj,
                                                 int len)
                                          throws RPCError
Decodes a String with a fixed length.

Parameters:
Obj - The Object that contains the data.
len - The max length of the encoded string.
Returns:
The String .
Throws:
RPCError - When the calls fails for any reason.

obj_encode_opaque

public static java.lang.Object obj_encode_opaque(byte[] b,
                                                 int len)
Encodes opaque data with a fixed length.

Parameters:
b - The opaque data to be encoded.
len - The max length of the encoded string.

obj_decode_opaque

public static byte[] obj_decode_opaque(java.lang.Object Obj,
                                       int len)
                                throws RPCError
Decodes a opaque data with a fixed length.

Parameters:
Obj - The Object that contains the data.
len - The max length of the encoded opaque data.
Returns:
The opaque data.
Throws:
RPCError - When the calls fails for any reason.