Re: ByteSizeUnit a la TimeUnit

2015-07-17 Thread Bernd Eckenfels
Am Fri, 17 Jul 2015 16:53:55 -0700 schrieb Gary Gregory : > > - Differenciate between decimal and binary prefixes, e.g. 1 > > Megabyte = 1000 Kilobyte, but 1 Mebibyte = 1024 Kibibyte. Not sure > > whether this is really that important. > > > > If we were to do only one I would do the base 2 case.

Re: ByteSizeUnit a la TimeUnit

2015-07-17 Thread Gary Gregory
On Wed, Jun 17, 2015 at 6:25 AM, Benedikt Ritter wrote: > 2015-06-17 14:03 GMT+02:00 David Blevins : > > > I'd be happy to donate these if we want them: > > > > > > > https://raw.githubusercontent.com/tomitribe/tomitribe-util/master/src/main/java/org/tomitribe/util/SizeUnit.java > > > > > https:/

Re: ByteSizeUnit a la TimeUnit

2015-07-17 Thread Gary Gregory
On Wed, Jun 17, 2015 at 6:25 AM, Benedikt Ritter wrote: > 2015-06-17 14:03 GMT+02:00 David Blevins : > > > I'd be happy to donate these if we want them: > > > > > > > https://raw.githubusercontent.com/tomitribe/tomitribe-util/master/src/main/java/org/tomitribe/util/SizeUnit.java > > > > > https:/

Re: ByteSizeUnit a la TimeUnit

2015-06-17 Thread Benedikt Ritter
2015-06-17 14:03 GMT+02:00 David Blevins : > I'd be happy to donate these if we want them: > > > https://raw.githubusercontent.com/tomitribe/tomitribe-util/master/src/main/java/org/tomitribe/util/SizeUnit.java > > https://raw.githubusercontent.com/tomitribe/tomitribe-util/master/src/test/java/org/

Re: ByteSizeUnit a la TimeUnit

2015-06-17 Thread David Blevins
I'd be happy to donate these if we want them: https://raw.githubusercontent.com/tomitribe/tomitribe-util/master/src/main/java/org/tomitribe/util/SizeUnit.java https://raw.githubusercontent.com/tomitribe/tomitribe-util/master/src/test/java/org/tomitribe/util/SizeUnitTest.java Which commons lib wou

[IO] Re: ByteSizeUnit a la TimeUnit

2015-06-17 Thread Benedikt Ritter
Hi Gary, 2015-06-17 9:50 GMT+02:00 Gary Gregory : > Hi All: > > Java 5 introduced TimeUnit, a very nice enum. > > What do you all think of a ByteSizeUnit enum to handle bit, nibble, byte, > kilobyte, kilobit, megabyte and so on? > Have a look at IO-294 [1] and IO-373 [2]. Benedikt [1] https://

ByteSizeUnit a la TimeUnit

2015-06-17 Thread Gary Gregory
Hi All: Java 5 introduced TimeUnit, a very nice enum. What do you all think of a ByteSizeUnit enum to handle bit, nibble, byte, kilobyte, kilobit, megabyte and so on? Gary -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition