on 09-27-2005 5:54 AM
Hi
Bapi is returning a byte array.I want to pass this value to another bapi which accepts string as parameter how to convert byte array to string ? and also i want to display the actual value stored in byte array.How to do this?
regards
suresh
Hi Suresh,
I don't think you can convert a byte array to string as such. But you can create a new string from a byte array as :
byte b[] = new byte[n];
.
populate the byte array
.
String str = new String(b);
<b>also i want to display the actual value stored in byte array</b>
Can you make your questin more clear? In what format do you want to display the data?
Best Regards,
Nibu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use new String(the byte value,"UTF-8");
and use this string for the next bapi as input !
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suresh,
Follow what is suggested by Nibu.
You can also display then this string as your binary data. It will show correct data.
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.