public static Object serializeClone(final Object obj) throws IOException,
			ClassNotFoundException {
		ByteArrayOutputStream memOut = new ByteArrayOutputStream();
		ObjectOutputStream objOut = new ObjectOutputStream(memOut);
		objOut.writeObject(obj);
		objOut.close();

		ByteArrayInputStream src = new ByteArrayInputStream(
				memOut.toByteArray());
		ObjectInputStream objIs = new ObjectInputStream(src);

		return objIs.readObject();
	}
Creates a clone by serializing object and deserializing byte stream.

@param obj
           object to serialize and deserialize.
@return clone
@throws IOException
            on IO error.
@throws ClassNotFoundException
            if class not found.
olv-core/src/test/java/pl/otros/logview/accept/query/org/apache/log4j/util/SerializationTestHelper.java