Package classycle.util
Class Text
- java.lang.Object
-
- classycle.util.Text
-
public class Text extends java.lang.ObjectCollection of useful static method concerning string manipulation.- Author:
- Franz-Josef Elmer
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringexcapeForXML(java.lang.String text)Escapes special XML characters in the specified text.static java.lang.StringreadTextFile(java.io.File file)Reads multi-line text from the specified file.
-
-
-
Method Detail
-
excapeForXML
public static java.lang.String excapeForXML(java.lang.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 java.lang.String readTextFile(java.io.File file) throws java.io.IOExceptionReads multi-line text from the specified file.- Parameters:
file- Text file.- Returns:
- read text file with standard Java newline characters.
- Throws:
java.io.IOException- if some reading error occurs.
-
-