Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to store 16 bytes in java.Which datatype i should use and how

I need to store 16 bytes in java.

How can i do the same.

Issue :

M = D || I

Here D would be 8 bytes, I would be 8 bytes and || denotes concatenation

so M will be 128 bits or 16 Byte long.

How can i store M in java datatype?

like image 806
VJS Avatar asked Feb 15 '12 07:02

VJS


1 Answers

How about a byte array ?

byte[] data = new byte[16];
like image 141
Thilo Avatar answered Sep 29 '22 00:09

Thilo