changed to use StringUtils in the implementations of replace/replaceAll/replaceFirst; added Javadoc