Android Question ByteConverter IntsToBytes

Martin Beukes

Member
Licensed User
Longtime User
Greetings,

I am needing to convert an array of ints to an array of bytes and back again. I am not sure if I am missing something obvious here.

B4X:
Dim InvTable() As Int = Array As Int (0x09, 0x19, 0x29)

Dim bs As ByteConverter
Dim b() As Byte = bs.IntsToBytes(InvTable())

That is as far as I have managed to get, but you will see the last line raises an error and I am not sure what to do.

Thanks,
Martin
 

Martin Beukes

Member
Licensed User
Longtime User
hahahahahahahaha, time for more coffee. I found what is wrong. Sorry for wasting anyone's time.

It was the brackets after the var name.
 
Upvote 0

npsonic

Active Member
Licensed User
hahahahahahahaha, time for more coffee. I found what is wrong. Sorry for wasting anyone's time.

It was the brackets after the var name.
Maybe it should be less coffee. First sign of this is when your speaking is beginning to close speed of light and no one hasn't understand anything you said after your second cup of coffee. When you are jumping over obvious mistakes you should relax a little.
 
Upvote 0
Top