Class Text

java.lang.Object
classycle.util.Text

public class Text extends Object
Collection of useful static method concerning string manipulation.
Author:
Franz-Josef Elmer
  • Method Details

    • excapeForXML

      public static String excapeForXML(String text)
      Escapes special XML characters in the specified text.
      Parameters:
      text - Text to be escaped. Must be not null.
      Returns:
      copy of the text where the special XML characters has been replaced by the escape sequences.
    • readTextFile

      public static String readTextFile(File file) throws IOException
      Reads multi-line text from the specified file.
      Parameters:
      file - Text file.
      Returns:
      read text file with standard Java newline characters.
      Throws:
      IOException - if some reading error occurs.