it.sauronsoftware.grab4j.html
Class HTMLEntities

java.lang.Object
  extended by it.sauronsoftware.grab4j.html.HTMLEntities

public class HTMLEntities
extends java.lang.Object

This class encodes and decodes HTML entities in strings.

Author:
Carlo Pelliccia

Constructor Summary
HTMLEntities()
           
 
Method Summary
static java.lang.String decode(java.lang.String str)
          This method decodes every HTML entity found in a string.
static java.lang.String encode(java.lang.String str)
          This method encodes a plain text string applying the known HTML entities.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLEntities

public HTMLEntities()
Method Detail

decode

public static java.lang.String decode(java.lang.String str)
This method decodes every HTML entity found in a string.

Parameters:
str - The string.
Returns:
A new string with HTML entities decoded.

encode

public static java.lang.String encode(java.lang.String str)
This method encodes a plain text string applying the known HTML entities.

Parameters:
str - The string.
Returns:
A new string with HTML entities encoded.