I'm trying to get a string into a bytebuffer, and I'm having a lot of
trouble doing so.
I've tried to convert it to a chararray using getchars, but without
success.
I've tried to convert it to a stringbuffer, and I've tried getBytes,
but nothing seems to give me a new object that
actually contains the original string, or something that I can convert
back into teh original string. Any idea what I'm doing wrong? How can
I get a string into a bytebuffer?
Thanks!
IchBin - 16 Feb 2006 05:50 GMT
> I'm trying to get a string into a bytebuffer, and I'm having a lot of
> trouble doing so.
[quoted text clipped - 9 lines]
>
> Thanks!
Look at the 'The Java Developers Almanac 1.4' for bytebuffer examples.
http://javaalmanac.com/egs/java.nio/PutString.html?l=rel

Signature
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Roedy Green - 17 Feb 2006 06:25 GMT
On 15 Feb 2006 20:10:12 -0800, "nooneinparticular314159@yahoo.com"
<nooneinparticular314159@yahoo.com> wrote, quoted or indirectly quoted
someone who said :
>I'm trying to get a string into a bytebuffer, and I'm having a lot of
>trouble doing so.
>
>I've tried to convert it to a chararray using getchars, but without
>success.
for String <-> byte[] <-> char[] conversion problems, see
http://mindprod.com/jgloss/conversion.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.