🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #559

Re: bitconverter

#559
From: Kevin Dean
Date: Fri, 06 Jun 2003 11:36
32 lines
2255 bytes
Thanks John.  I've never had a need to do that kind of bit manipulation in
Java but it's nice to know it's there.  That will come in handy someday.

-- 
Check out our latest white papers at
http://www.datadevelopment.com/papers/index.html

BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server

Dolphin Data Development Ltd.
http://www.datadevelopment.com/

"John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message
news:MPG.1949e2cadcc6a3f598bfd3@newsgroups.borland.com...
> On Thu, 5 Jun 2003 17:55:39 -0400, Kevin Dean wrote:
>
> > As for parsing out doubles etc. from it, I'm afraid
> > I can't think of any way for doing that.
>
> You can do that by packing the bytes into a long value in the order of
> your choosing using shift and masking operators and then converting the
> long value to a double using Double.longBitsToDouble().
>
> -- 
> Regards,
>
> John McGrath [TeamB]
>
> ---------------------------------------------------
> Before sending me e-mail, please read:
>     http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <3ee07d25$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3edf86be@newsgroups.borland.com> <3edf9b87$1@newsgroups.borland.com> <3edfa0df@newsgroups.borland.com> <3edfbd47$1@newsgroups.borland.com> <MPG.1949e2cadcc6a3f598bfd3@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,43739daf8911228a
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2003-06-06 04:39:15 PST
From: "Kevin Dean" <NkOdSePaAnM@datadevelopment.com>
Newsgroups: borland.public.jbuilder.java.api
References: <3edf86be@newsgroups.borland.com> <3edf9b87$1@newsgroups.borland.com> <3edfa0df@newsgroups.borland.com> <3edfbd47$1@newsgroups.borland.com> <MPG.1949e2cadcc6a3f598bfd3@newsgroups.borland.com>
Subject: Re: bitconverter
Date: Fri, 6 Jun 2003 07:36:45 -0400
Lines: 34
Organization: Dolphin Data Development Ltd.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 24.57.150.243
Message-ID: <3ee07d25$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1054899493 24.57.150.243 (6 Jun 2003 04:38:13 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail