data: Update TLV encoding/decoding

Change-Id: I142e5b42949737f0ac1f4bb6f072496c105693b0
diff --git a/include/ndn-cpp/data.hpp b/include/ndn-cpp/data.hpp
index d25253f..cd6176f 100644
--- a/include/ndn-cpp/data.hpp
+++ b/include/ndn-cpp/data.hpp
@@ -223,12 +223,7 @@
 {
   onChanged();
 
-  OBufferStream os;
-  Tlv::writeVarNumber(os, Tlv::Content);
-  Tlv::writeVarNumber(os, contentLength);
-  os.write(reinterpret_cast<const char *>(content), contentLength);
-    
-  content_ = Block(os.buf());
+  content_ = dataBlock(Tlv::Content, content, contentLength);
 }
 
 inline void