01: /**
02: * Title: <p>
03: * Description: <p>
04: * Copyright: Copyright (c) <p>
05: * Company: <p>
06: * @author
07: * @version 1.0
08: */package org.skunk.util;
09:
10: public class Asciiizer {
11:
12: public static String asciiize(String s) {
13: StringBuffer sb = new StringBuffer(s);
14: for (int i = 0; i < sb.length(); i++) {
15: char c = sb.charAt(i);
16: if ((c != 10 && c != 13 && c != 9) && (c < 32 || c > 126))
17: sb.setCharAt(i, '?');
18: }
19: return sb.toString();
20: }
21:
22: private Asciiizer() {
23: }
24: }
|