src: Making use of DEPRECATED macro and updating library code not to use deprecated methods

Change-Id: Ibe17977e7fcbb759a26dbe1cfa3d472598e49bcc
diff --git a/tools/tlvdump.cpp b/tools/tlvdump.cpp
index 5f5eac8..47752ae 100644
--- a/tools/tlvdump.cpp
+++ b/tools/tlvdump.cpp
@@ -97,7 +97,7 @@
   if (block.elements().empty())
     {
       std::cout << " [[";
-      ndn::name::Component(block.value(), block.value_size()).toEscapedString(std::cout);
+      ndn::name::Component(block.value(), block.value_size()).toUri(std::cout);
       std::cout<< "]]";
     }
   std::cout << std::endl;
@@ -151,7 +151,7 @@
 {
   while (is.peek() != std::char_traits<char>::eof()) {
     try {
-      ndn::Block block(is);
+      ndn::Block block = ndn::Block::fromStream(is);
       BlockPrinter(block, "");
       // HexPrinter(block, "");
     }