org.jutil
Class TObject

java.lang.Object
  extended by org.jutil.TObject

public class TObject
extends java.lang.Object

This is the TObject utility code class.


Constructor Summary
TObject()
          Ensure that no one can create instances of this Class.
 
Method Summary
static java.lang.Object deserialize(java.io.File file)
           
static java.lang.Object deserializeGZIP(java.io.File file)
           
static java.lang.Object fromBytes(byte[] bytes)
           
static java.lang.Object fromGZipBytes(byte[] bytes)
           
static int hash(java.lang.Object obj)
          returns an int hashed value of Object obj
usage: org.jutil.TObject.hash("123456");
static void serialize(java.lang.Object object, java.io.File file)
          org.jutil.TObject.serialize(Object object, File file)
static void serializeGZIP(java.lang.Object object, java.io.File file)
           
static byte[] toBytes(java.lang.Object object)
           
static byte[] toGZipBytes(java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TObject

public TObject()
Ensure that no one can create instances of this Class.

Method Detail

serialize

public static final void serialize(java.lang.Object object,
                                   java.io.File file)
                            throws java.io.IOException
org.jutil.TObject.serialize(Object object, File file)

Throws:
java.io.IOException

deserialize

public static final java.lang.Object deserialize(java.io.File file)
                                          throws java.io.IOException,
                                                 java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

serializeGZIP

public static final void serializeGZIP(java.lang.Object object,
                                       java.io.File file)
                                throws java.io.IOException
Throws:
java.io.IOException

deserializeGZIP

public static final java.lang.Object deserializeGZIP(java.io.File file)
                                              throws java.io.IOException,
                                                     java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

fromBytes

public static final java.lang.Object fromBytes(byte[] bytes)
                                        throws java.io.IOException,
                                               java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

toBytes

public static final byte[] toBytes(java.lang.Object object)
                            throws java.io.IOException
Throws:
java.io.IOException

fromGZipBytes

public static final java.lang.Object fromGZipBytes(byte[] bytes)
                                            throws java.io.IOException,
                                                   java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

toGZipBytes

public static final byte[] toGZipBytes(java.lang.Object object)
                                throws java.io.IOException
Throws:
java.io.IOException

hash

public static final int hash(java.lang.Object obj)
returns an int hashed value of Object obj
usage: org.jutil.TObject.hash("123456");