On 15 June 2013 14:58, Duncan Jones wrote:
> On 14 June 2013 07:55, Duncan Jones wrote:
>> On 13 June 2013 21:26, Phil Steitz wrote:
>>> On 6/13/13 1:03 AM, Duncan Jones wrote:
>
>>
>>> I am not sure where this little method would fit in [lang]; but it might
>>> make sense to add there in the si
On Sat, Jun 15, 2013 at 12:35 PM, Duncan Jones wrote:
> On 15 June 2013 15:49, Gary Gregory wrote:
> > I thought 2.6 had such a class and we got rid of it.
>
> 2.6 had a class by the same name (so I've discovered since your mail),
> but it merely amalgamated the different random methods from Math
On 15 June 2013 15:49, Gary Gregory wrote:
> I thought 2.6 had such a class and we got rid of it.
2.6 had a class by the same name (so I've discovered since your mail),
but it merely amalgamated the different random methods from Math and
Random.
I think this new class does exactly what is requir
I thought 2.6 had such a class and we got rid of it.
G
On Sat, Jun 15, 2013 at 9:58 AM, Duncan Jones wrote:
> On 14 June 2013 07:55, Duncan Jones wrote:
> > On 13 June 2013 21:26, Phil Steitz wrote:
> >> On 6/13/13 1:03 AM, Duncan Jones wrote:
>
> >
> >> I am not sure where this little metho
On 14 June 2013 07:55, Duncan Jones wrote:
> On 13 June 2013 21:26, Phil Steitz wrote:
>> On 6/13/13 1:03 AM, Duncan Jones wrote:
>
>> I am not sure where this little method would fit in [lang]; but it might
>> make sense to add there in the simple form above (with RANDOM
>> static, I assume).
>
On 13 June 2013 21:26, Phil Steitz wrote:
> On 6/13/13 1:03 AM, Duncan Jones wrote:
>> Hi,
>>
>> A piece of code I write far too often is:
>>
>> ==
>> public static byte[] getRandomBytes(int length) {
>> // validate length is non-negative
>>
>> byte[] result = new byte[length];
>> RANDOM.
On 6/13/13 1:03 AM, Duncan Jones wrote:
> Hi,
>
> A piece of code I write far too often is:
>
> ==
> public static byte[] getRandomBytes(int length) {
> // validate length is non-negative
>
> byte[] result = new byte[length];
> RANDOM.nextBytes(result);
> return result;
> }
> ==
>
>
Hi,
A piece of code I write far too often is:
==
public static byte[] getRandomBytes(int length) {
// validate length is non-negative
byte[] result = new byte[length];
RANDOM.nextBytes(result);
return result;
}
==
Is there a place for something like this in Commons Lang? Or, bet