Answer the question
In order to leave comments, you need to log in
How in my case to send an array with an array?
There is an array of type byte with data. byte[] outByte = new byte[60];
I need to send it along with this: send(new byte[]{1, (byte)144, 0, });
After 144, 0, I NEED TO INSERT ALL DATA FROM MY ARRAY
of type something like this send(new byte[]{1, (byte)144, 0, outByte});
but I still don't understand how to do it
Answer the question
In order to leave comments, you need to log in
just need to glue two arrays?
java.nio.ByteBuffer bb = java.nio.ByteBuffer.allocate(3+outByte.length);
bb.put(newArray);
bb.put(outByte);
send(bb.array());
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question