Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #22809

Re: parse output and check if a change

From Joerg Meier <joergmmeier@arcor.de>
Newsgroups comp.lang.java.programmer
Subject Re: parse output and check if a change
Date 2013-03-07 23:50 +0100
Message-ID <ocfl63quwss3.1eklrnb9rswic$.dlg@40tude.net> (permalink)
References <d8a65c18-bb59-42e8-85b9-8d47d4b21500@googlegroups.com> <5138e70e$0$32107$14726298@news.sunsite.dk>

Show all headers | View raw


On Thu, 07 Mar 2013 14:14:20 -0500, Arne Vajhøj wrote:

>      private static String toHex(byte[] ba) {
>          char hexdigit[] = { '0', '1', '2', '3', '4', '5', '6', '7', 
> '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
>          StringBuffer sb = new StringBuffer("");
>          for (int i = 0; i < ba.length; i++) {
>             sb.append(hexdigit[(ba[i] >> 4) & 0x0F]);
>             sb.append(hexdigit[ba[i] & 0x0F]);
>          }
>          return sb.toString();
>       }

For future reference:

DatatypeConverter.printHexBinary(ba).toLowerCase();

Liebe Gruesse,
		Joerg

-- 
Ich lese meine Emails nicht, replies to Email bleiben also leider
ungelesen.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

parse output and check if a change mike <mikaelpetterson@hotmail.com> - 2013-03-07 11:10 -0800
  Re: parse output and check if a change Arne Vajhøj <arne@vajhoej.dk> - 2013-03-07 14:14 -0500
    Re: parse output and check if a change Arne Vajhøj <arne@vajhoej.dk> - 2013-03-07 14:16 -0500
      Re: parse output and check if a change Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2013-03-08 19:16 -0800
        Re: parse output and check if a change Arne Vajhøj <arne@vajhoej.dk> - 2013-03-08 22:29 -0500
    Re: parse output and check if a change Joerg Meier <joergmmeier@arcor.de> - 2013-03-07 23:50 +0100
      Re: parse output and check if a change Arne Vajhøj <arne@vajhoej.dk> - 2013-03-07 19:13 -0500
  Re: parse output and check if a change Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-03-07 16:59 -0800
  Re: parse output and check if a change lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-03-08 08:54 +0000

csiph-web