Is there any easiest way to replace any carriage return in a String into "<BR>" when formatting the output to HTML?

I know there is a method of String called "replaceAll" but seems only available since JDK 1.4

Derek.