posted 20 years ago
I have tried a couple of different things, including passing the bytebuffer to the intbuffer (otherB). When I print the int buffer and when I grab the value from the buffer and put it in the array and print it they both come out like this:
contents of buffer written
1303005792
Then the int
1303005792
The question I have is - since there is a method, wrap() that can take an array and 'wrap' it to a buffer, is there something that can do the reverse? take a buffer's contents and unwrap it to an array?
You'll enjoy this, the reason I'm doing all this, that is. I am getting a character from a file, getting it's unicode value, using charset to get an ascii charset, translating the unicode value to ascii. I know it works because I can write the correct characters back to a file. But, in order to use an encryption algorythm, I need an integer value (ascii value) to run the algorythm. That means getting an integer from a byte buffer, somehow!