Is it possible to write an array without length to a parcel when the length is known?
Methods like this Parcel#readByteArray
are typically used in the examples I've seen:
byte[] _byte = new byte[in.readInt()];
in.readByteArray(_byte);
But there is no reason (I see) to write this instead
byte[] _byte = in.createByteArray();
It seems to be read*Array
more useful when the length is known in advance, but write*Array
always records the length. Is there a way to avoid writing it?
+3
source to share
No one has answered this question yet
Check out similar questions: