diff --git a/src/encoding/buffer-stream.cpp b/src/encoding/buffer-stream.cpp
new file mode 100644
index 0000000..e60ba77
--- /dev/null
+++ b/src/encoding/buffer-stream.cpp
@@ -0,0 +1,55 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2016 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "buffer-stream.hpp"
+
+namespace ndn {
+namespace detail {
+
+BufferAppendDevice::BufferAppendDevice(Buffer& container)
+  : m_container(container)
+{
+}
+
+std::streamsize
+BufferAppendDevice::write(const char_type* s, std::streamsize n)
+{
+  std::copy(s, s + n, std::back_inserter(m_container));
+  return n;
+}
+
+} // namespace detail
+
+OBufferStream::OBufferStream()
+  : m_buffer(make_shared<Buffer>())
+  , m_device(*m_buffer)
+{
+  open(m_device);
+}
+
+shared_ptr<Buffer>
+OBufferStream::buf()
+{
+  flush();
+  return m_buffer;
+}
+
+} // namespace ndn
diff --git a/src/encoding/buffer-stream.hpp b/src/encoding/buffer-stream.hpp
index be76704..b813e49 100644
--- a/src/encoding/buffer-stream.hpp
+++ b/src/encoding/buffer-stream.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -26,84 +26,63 @@
 
 #include "buffer.hpp"
 
-#include <boost/iostreams/detail/ios.hpp>
 #include <boost/iostreams/categories.hpp>
 #include <boost/iostreams/stream.hpp>
 
 namespace ndn {
 
-/// @cond include_hidden
-namespace iostreams
-{
+namespace detail {
 
-class buffer_append_device
+/** @brief (implementation detail) a Boost.Iostreams.Sink which appends to an \p ndn::Buffer
+ */
+class BufferAppendDevice
 {
 public:
   typedef char char_type;
   typedef boost::iostreams::sink_tag category;
 
-  buffer_append_device(Buffer& container)
-    : m_container(container)
-  {
-  }
+  explicit
+  BufferAppendDevice(Buffer& container);
 
   std::streamsize
-  write(const char_type* s, std::streamsize n)
-  {
-    std::copy(s, s+n, std::back_inserter(m_container));
-    return n;
-  }
+  write(const char_type* s, std::streamsize n);
 
 protected:
   Buffer& m_container;
 };
 
-} // iostreams
-/// @endcond
+} // namespace detail
 
-/**
- * Class implementing interface similar to ostringstream, but to construct ndn::Buffer
+/** @brief implements an output stream that constructs \p ndn::Buffer
  *
- * The benefit of using stream interface is that it provides automatic buffering of
- * written data and eliminates (or reduces) overhead of resizing the underlying buffer
- * when writing small pieces of data.
+ *  The benefit of using stream interface is that it provides automatic buffering of
+ *  written data and eliminates (or reduces) overhead of resizing the underlying buffer
+ *  when writing small pieces of data.
  *
- * Usage example:
- * @code
- *      OBufferStream obuf;
- *      obuf.put(0);
- *      obuf.write(another_buffer, another_buffer_size);
- *      shared_ptr<Buffer> buf = obuf.get();
- * @endcode
+ *  Usage example:
+ *  @code
+ *  OBufferStream obuf;
+ *  obuf.put(0);
+ *  obuf.write(anotherBuffer, anotherBufferSize);
+ *  shared_ptr<Buffer> buf = obuf.buf();
+ *  @endcode
  */
-class OBufferStream : public boost::iostreams::stream<iostreams::buffer_append_device>
+class OBufferStream : public boost::iostreams::stream<detail::BufferAppendDevice>
 {
 public:
-  /**
-   * Default constructor
-   */
-  OBufferStream()
-    : m_buffer(make_shared<Buffer>())
-    , m_device(*m_buffer)
-  {
-    open(m_device);
-  }
+  OBufferStream();
 
   /**
    * Flush written data to the stream and return shared pointer to the underlying buffer
    */
   shared_ptr<Buffer>
-  buf()
-  {
-    flush();
-    return m_buffer;
-  }
+  buf();
 
 private:
   BufferPtr m_buffer;
-  iostreams::buffer_append_device m_device;
+  detail::BufferAppendDevice m_device;
 };
 
-} // ndn
+} // namespace ndn
 
 #endif // NDN_ENCODING_BUFFER_STREAM_HPP
