Handling ASCII character set in Java (III)
8 February 2008This post is the final part of Handling ASCII character set in Java. Do read the previous parts before going through this one.
Now lets use this one to see if it really works:
ArrayList<String> list = new ArrayList<String>(); list.add("ABCDEF123"); list.add("-_-#*"); list.add("üä"); list = valiateCharacterSetAscii(list); System.out.println(list);
I created an ArrayList with strings. I added some non ASCII characters for testing. I called calidateCharacterSetAscii(…) method and then printed the resultant ArrayList.
Output:
[ABCDEF123, -_-#*, nullnull]
The output is as expected. Non ASCII printable characters are replaced by null.
Happy coding.
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Handling ASCII character set in Java (III)