integer - JAVA: [-255...255] int to 2 bytes array -


i have integer can contains values between - 255 , 255. know can represented 2 bytes (i'm right?) how can convert int 2 bytes array? many

rather store in 2 distinct bytes , implement own custom encoding , decoding, easiest store these values in short. 16 bit signed integer sufficient range values.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -