> I have a problem. I have an Octet String "00101101". How can I
> convert it into byte 00101101?
String s = "00101101";
byte b = Byte.parseByte(s,2);
/gordon

Signature
[ do not email me copies of your followups ]
g o r d o n + n e w s @ b a l d e r 1 3 . s e
kchoudha@gmail.com - 20 Dec 2005 15:55 GMT
> > I have a problem. I have an Octet String "00101101". How can I
> > convert it into byte 00101101?
[quoted text clipped - 7 lines]
> [ do not email me copies of your followups ]
> g o r d o n + n e w s @ b a l d e r 1 3 . s e
palmis - 21 Dec 2005 08:20 GMT
Dear Gordon and Roedy,
Thank you very much.
Palmis
>I have a problem. I have an Octet String "00101101". How can I convert
>it into byte 00101101?
see http://mindprod.com/applet/converter.html
String -> int
you have binary, radix 2. Don't confuse octet with octal, radix 8.
See also http://mindprod.com/jgloss/binary.html

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