code: public static Object serializeAndDeserialize(Object o) throws IOException,
  			ClassNotFoundException {
  		ByteArrayOutputStream bytes = new ByteArrayOutputStream();
  		ObjectOutputStream out = new ObjectOutputStream(bytes);
  		try {
  			out.writeObject(o);
  		} finally {
  			out.close();
  		}
  
  		ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(
  				bytes.toByteArray()));
  		try {
  			Object result = in.readObject();
  			return result;
  		} finally {
  			in.close();
  		}
  	}
docs: Serializes and deserializes the given object.
  
  @param o
  an <code>Object</code>.
  @return an <code>Object</code>.
  @throws IOException
  @throws ClassNotFoundException