|
Hello
All,
I am working on Oracle9i and accessing a PL/SQP Procedure through Java(EJB) ,that is returning me some Strings.The problem i am facing is ,i have a String called "EmailAddresses" which the Package is returning me a Hexadecimal Value instead of returning a String value. For e.g. instead of returning say, an email address
[EMAIL PROTECTED], it returns
as one big string the HEX equivalent of each character in �[EMAIL PROTECTED]�. It
returns "0x736D616C6C6170754069782E6E6574636F6D2E636F6D".
The first 0x denotes that what follows is in HEX
format.73 is the hex equivalent of letter �s�, 6D is hex equivalent of letter
�m� and so on.
the Code is,
<code> p1arr = (ARRAY) cstmt.getArray(13); p1obj = (String[])p1arr.getArray(); int ElementCount = cstmt.getInt(14);
ArrayList addresses = new ArrayList();
for(int i=0;i<ElementCount;i++) { addresses.add(p1obj[i]); System.out.println("The Email Addresses in the Arraylist is****** :"+addresses); } </code>
The SOP prints out the contents of Arraylist in Hexadecimal Format instead
of String Format....
How do i get the Proper Format of Strings instead of getting it in
Hexadecimal format.....
Is there a way i can convert a String Containing Hex Formated String into a proper String... For e.g
I want to get, String emailAddresses = "[EMAIL PROTECTED]" instead of String emailAddresses = "0x736D616C6C6170754069782E6E6574636F6D2E636F6D"; I will be having hundereds of such EmailAddresses which will contain
Hexadecimal values....how do i go about converting all of them to proper format
Strings....
Can anybody please help me out with this problem...Any suggestions or code
will be greatly appreciated...
Thanks in advance Regards
Sam |
- Re: Converting a String containing Hexadecimal values ... ssmtech
- Re: Converting a String containing Hexadecimal va... Balasubramaniyan K
