code: public static <T extends Serializable> byte[] serializeObject( T object ) throws IOException {
  
  		ByteArrayOutputStream os = new ByteArrayOutputStream();
  		ObjectOutputStream out = new ObjectOutputStream( os );
  		out.writeObject( object );
  
  		return os.toByteArray();
  	}
docs: Serializes an object.
  @param object a serializable object
  @return a non-null array of bytes
  @throws IOException