diff --git a/include/ndn-cpp/name.hpp b/include/ndn-cpp/name.hpp
index b6b2e01..192fa31 100644
--- a/include/ndn-cpp/name.hpp
+++ b/include/ndn-cpp/name.hpp
@@ -588,17 +588,34 @@
    * @param result the string stream to write to.
    */
   static void 
-  toEscapedString(const std::vector<uint8_t>& value, std::ostream& result);
+  toEscapedString(const uint8_t *value, size_t valueSize, std::ostream& result);
 
+  inline static void 
+  toEscapedString(const std::vector<uint8_t>& value, std::ostream& result)
+  {
+    toEscapedString(&*value.begin(), value.size(), result);
+  }
+  
   /**
    * Convert the value by escaping characters according to the NDN URI Scheme.
    * This also adds "..." to a value with zero or more ".".
    * @param value the buffer with the value to escape
    * @return The escaped string.
    */
-  static std::string
-  toEscapedString(const std::vector<uint8_t>& value);
+  inline static std::string
+  toEscapedString(const uint8_t *value, size_t valueSize)
+  {
+    std::ostringstream result;
+    toEscapedString(value, valueSize, result);
+    return result.str();
+  }
 
+  static inline std::string
+  toEscapedString(const std::vector<uint8_t>& value)
+  {
+    return toEscapedString(&*value.begin(), value.size());
+  }
+  
   //
   // vector equivalent interface.
   //
diff --git a/src/name.cpp b/src/name.cpp
index 0a0b0e3..b71c23c 100644
--- a/src/name.cpp
+++ b/src/name.cpp
@@ -259,10 +259,10 @@
 }
 
 void
-Name::toEscapedString(const vector<uint8_t>& value, std::ostream& result)
+Name::toEscapedString(const uint8_t *value, size_t valueSize, std::ostream& result)
 {
   bool gotNonDot = false;
-  for (unsigned i = 0; i < value.size(); ++i) {
+  for (unsigned i = 0; i < valueSize; ++i) {
     if (value[i] != 0x2e) {
       gotNonDot = true;
       break;
@@ -271,14 +271,14 @@
   if (!gotNonDot) {
     // Special case for component of zero or more periods.  Add 3 periods.
     result << "...";
-    for (size_t i = 0; i < value.size(); ++i)
+    for (size_t i = 0; i < valueSize; ++i)
       result << '.';
   }
   else {
     // In case we need to escape, set to upper case hex and save the previous flags.
     ios::fmtflags saveFlags = result.flags(ios::hex | ios::uppercase);
     
-    for (size_t i = 0; i < value.size(); ++i) {
+    for (size_t i = 0; i < valueSize; ++i) {
       uint8_t x = value[i];
       // Check for 0-9, A-Z, a-z, (+), (-), (.), (_)
       if ((x >= 0x30 && x <= 0x39) || (x >= 0x41 && x <= 0x5a) ||
@@ -298,14 +298,6 @@
   }  
 }
 
-string
-Name::toEscapedString(const vector<uint8_t>& value)
-{
-  ostringstream result;
-  toEscapedString(value, result);
-  return result.str();
-}
-
 bool 
 Name::breadthFirstLess(const Name& name1, const Name& name2)
 {
@@ -363,6 +355,8 @@
 void
 Name::wireDecode(const Block &wire)
 {
+  clear();
+  
   wire_ = wire;
   wire_.parse();
 
