This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

*urgent : mirror-ing string content to byte...  RSS feed

 
Ryan Crow
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,
can someone please show me how do i clone my string value to byte[] type? when i say clone, i mean copying the exact characters but just by switching the data type...
as of :
String st = "ABCdeF";
needed to be converted to
byte[] bt = ABCdeF;
im having a midlet doing http calls to the servlet, which by sending it in its url convert the earlier byte[] data to string. so at the servlet side i need to have it in byte[] again before further processing...
using .getBytes() on the string doesnt help as it converts the string data value to byte[] value format....
someone please help?
many thanks,
ryan.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!