com.liferay.portal.util
Class DiffHtmlImpl

java.lang.Object
  extended by com.liferay.portal.util.DiffHtmlImpl
All Implemented Interfaces:
com.liferay.portal.kernel.util.DiffHtml

public class DiffHtmlImpl
extends java.lang.Object
implements com.liferay.portal.kernel.util.DiffHtml

View Source

This class can compare two different versions of HTML code. It detects changes to an entire HTML page such as removal or addition of characters or images.

Author:
Julio Camarero

Constructor Summary
DiffHtmlImpl()
           
 
Method Summary
 java.lang.String diff(java.io.Reader source, java.io.Reader target)
          This is a diff method with default values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffHtmlImpl

public DiffHtmlImpl()
Method Detail

diff

public java.lang.String diff(java.io.Reader source,
                             java.io.Reader target)
                      throws java.lang.Exception
This is a diff method with default values.

Specified by:
diff in interface com.liferay.portal.kernel.util.DiffHtml
Parameters:
source - the Reader of the source text, this can be for example, an instance of FileReader or StringReader
target - the Reader of the target text
Returns:
a string containing the HTML code of the source text showing the differences with the target text
Throws:
java.lang.Exception