Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Bytebuffer

 
chella adisesh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do we convert a bytebuffer to an string.
Thanks.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this:

Or

The latter is a little more efficient if you reuse the decoder. Of course, replace UTF-8 with whatever encoding is appropriate for your application.
 
chella adisesh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jim,
Thank you very much. I have run into a problem in my program which i did not see it coming. Actually the program wants to convert a string into a byte buffer.
Any pointers will be appreciated.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic