Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Converting byteArray in UTF-16 format to String or character.

kumar mahesh
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I invoke a webservice which returns the data in a byte array but in UTF-16 format with every character stored in two consecutive bytes. Thus the first character in the data would be stored in arr[0] and arr[1], with the more significant byte stored in arr[1]. I need to convert this byte Array into a String.

For Ex:
byte[] arr = //invoke the web method.

Kindly reply.

A day job? In an office? My worst nightmare! Comfort me tiny ad!
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!