I have a problem with control characters in javaString. Say i have a code like this byte b = new byte; DatagramPacket d = new DatagramPacket(b, b.length); the array b will be initialised with null characters. when the datagram is received, its length is lesser than 1024... and when i convert the byte array to string and write to a file, i get those pesky control characters at the end. Please give me some code that'll replace all the control characters (except may b \n and \t) with something else (say, space).
Thanks<br />Karthik<br />SCJP 1.4, CCNA.<br /> <br />"Success is relative. More the success, more the relatives."
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop