hidl_vec: add data() method
am: 6f0c9a168e

Change-Id: I4118f61077b7801d361ed2f0b7bcac97b642677a
diff --git a/include/hidl/HidlSupport.h b/include/hidl/HidlSupport.h
index c9e007a..16f460f 100644
--- a/include/hidl/HidlSupport.h
+++ b/include/hidl/HidlSupport.h
@@ -105,6 +105,14 @@
         mOwnsBuffer = false;
     }
 
+    T *data() {
+        return mBuffer;
+    }
+
+    const T *data() const {
+        return mBuffer;
+    }
+
     hidl_vec &operator=(hidl_vec &&other) {
         mBuffer = other.mBuffer;
         mSize = other.mSize;