aspose file tools
The moose likes Java in General and the fly likes Bytebuffer Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Bytebuffer" Watch "Bytebuffer" New topic
Author

Bytebuffer

chella adisesh
Greenhorn

Joined: Oct 10, 2003
Posts: 7
How do we convert a bytebuffer to an string.
Thanks.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18670
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.


"I'm not back." - Bill Harding, Twister
chella adisesh
Greenhorn

Joined: Oct 10, 2003
Posts: 7
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Bytebuffer
 
Similar Threads
Conversion of Big Endian to Little Endian Vise versa
Anyone use the NIO package?
File Channels == Big Headache
Convert byte stream to int
ascii to number conversion in java