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


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

Re: number to byte[]

Path csiph.com!xmission!news.glorb.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!fx22.iad.POSTED!not-for-mail
Subject Re: number to byte[]
Newsgroups comp.lang.java.programmer
References <mvsv9r$ohb$1@ls237.t-com.hr> <mvtd9u$c4m$1@dont-email.me> <mvud46$eat$1@ls237.t-com.hr> <d8jsa9Fi4ifU1@mid.individual.net>
From Wayne <nospam@all.invalid>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version 1.0
In-Reply-To <d8jsa9Fi4ifU1@mid.individual.net>
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
Lines 19
Message-ID <_FjVx.97306$ot4.21484@fx22.iad> (permalink)
X-Complaints-To abuse@newshosting.com
NNTP-Posting-Date Tue, 20 Oct 2015 04:45:46 UTC
Organization Newshosting.com - Highest quality at a great price! www.newshosting.com
Date Tue, 20 Oct 2015 00:45:44 -0400
X-Received-Bytes 1452
X-Received-Body-CRC 1805957892
Xref csiph.com comp.lang.java.programmer:32903

Show key headers only | View raw


On 10/19/2015 5:43 AM, Nigel Wade wrote:
> On 17/10/15 22:03, Askfor wrote:
>> It is going to be a part of a data header, which needs to be of fixed length. Also
>> it will contain a value of an offset
>> which cabn't be longer than 32-bits. So, I don't care how big int actually is, as
>> long as it is big enough to hold 32
>> bit unsigned value.
> 
> int is signed, as are all Java integers.
> int won't hold a 32bit unsigned integer.
> 
> ...
> 

Actually, in Java 8 a number of methods were added to java.lang.Integer,
to work with unsigned integers that take 32 bits of storage.

-- 
Wayne

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


Thread

number to byte[] Askfor <askfor@nowhere.net> - 2015-10-17 10:02 +0200
  Re: number to byte[] Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-10-17 08:03 -0400
    Re: number to byte[] Askfor <askfor@nowhere.net> - 2015-10-17 23:03 +0200
      Re: number to byte[] Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-10-17 17:45 -0400
        Re: number to byte[] Askfor <askfor@nowhere.net> - 2015-10-18 12:13 +0200
          Re: number to byte[] Askfor <askfor@nowhere.net> - 2015-10-18 12:44 +0200
            Re: number to byte[] Lew <lewbloch@gmail.com> - 2015-11-29 23:07 -0800
          Re: number to byte[] Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-10-18 08:40 -0400
      Re: number to byte[] Nigel Wade <nmw@ion.le.ac.uk> - 2015-10-19 10:43 +0100
        Re: number to byte[] Wayne <nospam@all.invalid> - 2015-10-20 00:45 -0400
        Re: number to byte[] Kevin McMurtrie <mcmurtrie@pixelmemory.us> - 2015-10-20 13:35 -0700
  Re: number to byte[] Lothar Kimmeringer <news200709@kimmeringer.de> - 2015-10-25 10:22 +0100

csiph-web