com.sentilla.host.client.network
Class DecodeMessage

java.lang.Object
  extended by com.sentilla.host.client.network.DecodeMessage

public class DecodeMessage
extends Object

Decode a message from the network.

This is a helper class that can convert the contents of a class to a String.


Field Summary
private static String outString
           
private static boolean showDetails
           
private static boolean showPrivate
           
 
Constructor Summary
DecodeMessage()
           
 
Method Summary
static Object decodeMessage(Object obj, boolean showDetails, boolean showPrivate)
          Decode a message.
static String printByteBuffer(ByteBuffer body)
          Prints contents of a ByteBuffer.
private static String printClass(Class c, Object obj, int indent, Set<Object> printedSet)
          Prints contents of any object.
static String printMessage(Object obj, boolean _showDetails, boolean _showPrivate)
          Print a message.
static String toString(Object obj)
          Returns a String version of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outString

private static String outString

showDetails

private static boolean showDetails

showPrivate

private static boolean showPrivate
Constructor Detail

DecodeMessage

public DecodeMessage()
Method Detail

decodeMessage

public static Object decodeMessage(Object obj,
                                   boolean showDetails,
                                   boolean showPrivate)
Decode a message.

Parameters:
obj - The object to decode
showDetails - Show the member values of the object
showPrivate - Show the private member values of the object
Returns:
Object that was decoded

toString

public static String toString(Object obj)
Returns a String version of the object.


printMessage

public static String printMessage(Object obj,
                                  boolean _showDetails,
                                  boolean _showPrivate)
Print a message.

Parameters:
obj - The object to decode
_showDetails - Show the member values of the object
_showPrivate - Show the private member values of the object

printClass

private static String printClass(Class c,
                                 Object obj,
                                 int indent,
                                 Set<Object> printedSet)
                          throws IllegalAccessException
Prints contents of any object.

Throws:
IllegalAccessException

printByteBuffer

public static String printByteBuffer(ByteBuffer body)
Prints contents of a ByteBuffer.



Copyright © 2007 Sentilla, Inc. All Rights Reserved.