Since some of binary data formats support efficient representations for arrays of fixed-length scalars, let's add new writeArray(...) value write methods. Adding 3 overloads should suffice for now:
- 2 main integral types:
int, long (we already have writeBinary() for byte arrays)
- the main floating point type
,double`
Although I earlier thought of more general approach that combines this with writeStartArray(), it really seems much simpler, and potentially more efficient, to have unified write.
In future we may also consider addition of alternate sources, if that makes sense (ByteBuffer and variants). Similarly we may consider support for float and perhaps short if there is demand for these.
Since some of binary data formats support efficient representations for arrays of fixed-length scalars, let's add new
writeArray(...)value write methods. Adding 3 overloads should suffice for now:int,long(we already havewriteBinary()for byte arrays),double`Although I earlier thought of more general approach that combines this with
writeStartArray(), it really seems much simpler, and potentially more efficient, to have unified write.In future we may also consider addition of alternate sources, if that makes sense (
ByteBufferand variants). Similarly we may consider support forfloatand perhapsshortif there is demand for these.