In encode methods, return a ptr_lib::shared_ptr<vector<unsigned char> >
diff --git a/ndn-cpp/encoding/BinaryXMLWireFormat.hpp b/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
index d35660f..20ebacd 100644
--- a/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
+++ b/ndn-cpp/encoding/BinaryXMLWireFormat.hpp
@@ -12,10 +12,10 @@
 
 class BinaryXMLWireFormat : public WireFormat {
 public:
-  virtual void encodeInterest(const Interest &interest, std::vector<unsigned char> &output);
+  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeInterest(const Interest &interest);
   virtual void decodeInterest(Interest &interest, const unsigned char *input, unsigned int inputLength);
 
-  virtual void encodeContentObject(const ContentObject &contentObject, std::vector<unsigned char> &output);
+  virtual ptr_lib::shared_ptr<std::vector<unsigned char> > encodeContentObject(const ContentObject &contentObject);
   virtual void decodeContentObject(ContentObject &contentObject, const unsigned char *input, unsigned int inputLength);
   
   static BinaryXMLWireFormat &instance() { return instance_; }