Binary to ASCII Question
From: dog (dawgwannabe_at_yahoo.com)
Date: 10/23/03
- Next message: Arthur J. O'Dwyer: "Re: approx 100 assorted computer/ math/other books"
- Previous message: Joona I Palaste: "Re: short-circuit operators - part of the spec?"
- Next in thread: Marco Schmidt: "Re: Binary to ASCII Question"
- Reply: Marco Schmidt: "Re: Binary to ASCII Question"
- Reply: Steve W. Jackson: "Re: Binary to ASCII Question"
- Reply: Dale King: "Re: Binary to ASCII Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Oct 2003 15:44:17 -0500
Binary to ascii Question
I pick a JPG a.jpg
I read in it using ServletInputStream to a byte[] array
bytes are, of course, signed one byte things
So if you got through the array you get int values between -127 and 127
If you say
String s = new String(byteArray)
char[] x = s.toCharArray();
And then go through that away you get int values way above 256
Why?
Really just wondering. I would think it would translate each byte to the
unicode equal which is what I am trying to do. Okay that didn't work, but
what did it do? Anyeasy way to go from a JPG to unicode?
Do I add 128 to all the byte value of just knock of the sign? Or niether?
- Next message: Arthur J. O'Dwyer: "Re: approx 100 assorted computer/ math/other books"
- Previous message: Joona I Palaste: "Re: short-circuit operators - part of the spec?"
- Next in thread: Marco Schmidt: "Re: Binary to ASCII Question"
- Reply: Marco Schmidt: "Re: Binary to ASCII Question"
- Reply: Steve W. Jackson: "Re: Binary to ASCII Question"
- Reply: Dale King: "Re: Binary to ASCII Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
Loading