public static void writeByteArray(byte[] array, DataOutput out) throws IOException {
    int len = 0;
    if (array != null) {
      len = array.length;
    }
    writeByteArray(array, len, out);
  }
array len encoded as unsigned short in next 2 bytes

@since GemFire 5.7
geode-serialization/src/main/java/org/apache/geode/internal/serialization/StaticSerialization.java