octet string

Discussion in 'Java' started by palmis, Dec 20, 2005.

  1. palmis

    palmis Guest

    Hi,
    I have a problem. I have an Octet String "00101101". How can I convert
    it into byte 00101101?
    Thanks.
     
    palmis, Dec 20, 2005
    #1
    1. Advertising

  2. On 20 Dec 2005 03:48:05 -0800, palmis wrote:
    > 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

    --
    [ 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
     
    Gordon Beaton, Dec 20, 2005
    #2
    1. Advertising

  3. palmis

    Guest

    Gordon Beaton wrote:
    > On 20 Dec 2005 03:48:05 -0800, palmis wrote:
    > > 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
    >
    > --
    > [ 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
     
    , Dec 20, 2005
    #3
  4. palmis

    Roedy Green Guest

    Roedy Green, Dec 20, 2005
    #4
  5. palmis

    palmis Guest

    Dear Gordon and Roedy,
    Thank you very much.

    Palmis
     
    palmis, Dec 21, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul J. Lay
    Replies:
    2
    Views:
    637
    Steven Cheng[MSFT]
    Apr 8, 2004
  2. CVerma
    Replies:
    2
    Views:
    10,267
    C Verma
    Sep 28, 2004
  3. Matthew

    octet string conversion

    Matthew, Jul 28, 2003, in forum: Python
    Replies:
    5
    Views:
    16,565
    Matthew
    Jul 29, 2003
  4. Replies:
    7
    Views:
    1,218
    CBFalconer
    Nov 17, 2006
  5. miltizem

    Octet String Conversion

    miltizem, Jul 22, 2008, in forum: Java
    Replies:
    0
    Views:
    693
    miltizem
    Jul 22, 2008
Loading...

Share This Page