A Small Code Snippet to Convert String to Hex-Decimal
class StringtoHexConvertion {
public static void main(String args[]){
try{
String imputString = "000000000002";
byte[] bytes = imputString .getBytes("US-ASCII");
String str1 = "";
for(int i=0;i
System.out.println("byte value = "+ bytes[i]);
str1 = str1 + Integer.toHexString(bytes[i]);
}
System.out.println(" final String = "+ str1);
}
catch(Exception e){}
}
}
It might be helpful for some sceneries.
Thanks, just what I needed!
ReplyDeleteIncredible! This blog looks just like my old one!
ReplyDeleteIt's on a totally different subject but it has pretty much the same layout and design. Wonderful choice of colors!
my web blog; devis fenetre pvc