javawebparts.response
Class ResponseHelpers

java.lang.Object
  |
  +--javawebparts.response.ResponseHelpers

public final class ResponseHelpers
extends java.lang.Object

This class contains static methods that are too small to warrant their own class. General response-related utility methods.

Author:
Frank W. Zammetti.

Constructor Summary
private ResponseHelpers()
          This is a utility class, so we want a private noarg constructor so instances cannot be created.
 
Method Summary
static java.lang.String encodeEntities(java.lang.String str, java.lang.String exclusions)
          This method replaces any character in a given string that has a corresponding HTML entity with that entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseHelpers

private ResponseHelpers()
This is a utility class, so we want a private noarg constructor so instances cannot be created.

Method Detail

encodeEntities

public static java.lang.String encodeEntities(java.lang.String str,
                                              java.lang.String exclusions)
This method replaces any character in a given string that has a corresponding HTML entity with that entity. You can also pass it a string containing characters you DO NOT want entities inserted for. In actuality, the method that does the actual work is in JWPHelpers, but is called from here. The code in JWPHelpers was originally here only, but it was moved into JWPHelpers to eliminate a cross-package dependency between the taglib package (because of basicstr taglib) and the response package.

Parameters:
str - The string to insert entities into.
exclusions - Characters you DO NOT wanted entities inserted for. Pass null for no exclusions.
Returns:
A new string with HTML entities replacing all charactercs, except those excluded, that have corresponding entities.


Copyright © 2005 Frank W. Zammetti