Re: 0x00FF Arrg...



On 20 May 2006 02:15:16 -0700, "IveCal" <ive.cal@xxxxxxxxx> wrote,
quoted or indirectly quoted someone who said :

sb.append( ( int )( 0x00FF & b ) ); ==> PROBLEM!!!

I think you want a hex string.

the & automatically promotes to int so (int) does nothing.

Then you want to go back to a String, a HEX string rather than the
default decimal one.

See http://mindprod.com/jgloss/hex.html
http://mindprod.com/applets/converter.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.



Relevant Pages

  • Re: Is there a simpler way?
    ... Binary value or binary string? ... If you need to convert a hex string to a binary strings, ... static int setdigit; ... int SevStrHexToBin(const char *hexval, int groupchar, ...
    (microsoft.public.dotnet.languages.vc)
  • Re: CString hex value to CString decimal value
    ... P.S. you might what to change the return type to a long instead of an int. ... > and then put back as a string into an other CString. ... > that converting a large hex string to int does not work. ...
    (microsoft.public.vc.mfc)
  • Re: Interesting Integer.parseInt() problem
    ... >>From some experimenting it appears parseIntis not an inverse of ... In other words the hex string to parseInt ... int back = Integer.parseInt; ...
    (comp.lang.java.programmer)
  • Re: convert hex string to hex
    ... Do you mean binary type? ... Convert hex string to int: ...
    (microsoft.public.sqlserver.programming)
  • Re: ? Identifying Current Language Code
    ... Here is a link about convern hex string into int, ... Convert Hex String to an Integer Value. ... - by Borland Developer Support Staff ...
    (microsoft.public.vc.mfc)