Package net.thauvin.erik.httpstatus
Class Utils
java.lang.Object
net.thauvin.erik.httpstatus.Utils
The
Utils class implements a collection of utility methods used throughout this project.- Since:
- 1.0
- Author:
- Erik C. Thauvin
-
Method Summary
-
Method Details
-
escapeXml
Converts<,>,&,',"to their corresponding entity codes.- Parameters:
value- The string value to convert- Returns:
- The converted string value
-
outWrite
public static void outWrite(Writer out, String value, String defaultValue, boolean xml) throws IOException Writes a string value to the specified writer, with optional XML escaping. The default value is used when the actual value is null.- Parameters:
out- The writer to output the value tovalue- The string valuedefaultValue- The default valuexml- Thexmlflag- Throws:
IOException- If an I/O error occursNullPointerException- If the writer is null
-