diff --git a/disabled/charbuf.cc b/disabled/charbuf.cc
new file mode 100644
index 0000000..12425f6
--- /dev/null
+++ b/disabled/charbuf.cc
@@ -0,0 +1,79 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+/*
+ * Copyright (c) 2013, Regents of the University of California
+ *                     Alexander Afanasyev
+ *                     Zhenkai Zhu
+ *
+ * BSD license, See the LICENSE file for more information
+ *
+ * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
+ *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include "charbuf.h"
+
+using namespace std;
+
+namespace ndn {
+
+void
+Charbuf::init(ccn_charbuf *buf)
+{
+  if (buf != NULL)
+  {
+    m_buf = ccn_charbuf_create();
+    ccn_charbuf_reserve(m_buf, buf->length);
+    memcpy(m_buf->buf, buf->buf, buf->length);
+    m_buf->length = buf->length;
+  }
+}
+
+Charbuf::Charbuf()
+            : m_buf(NULL)
+{
+  m_buf = ccn_charbuf_create();
+}
+
+Charbuf::Charbuf(ccn_charbuf *buf)
+            : m_buf(NULL)
+{
+  init(buf);
+}
+
+Charbuf::Charbuf(const Charbuf &other)
+            : m_buf (NULL)
+{
+  init(other.m_buf);
+}
+
+Charbuf::Charbuf(const void *buf, size_t length)
+{
+  m_buf = ccn_charbuf_create ();
+  ccn_charbuf_reserve (m_buf, length);
+  memcpy (m_buf->buf, buf, length);
+  m_buf->length = length;
+}
+
+Charbuf::~Charbuf()
+{
+  ccn_charbuf_destroy (&m_buf);
+}
+
+namespace iostreams
+{
+
+charbuf_append_device::charbuf_append_device (Charbuf& cnt)
+  : container (cnt)
+{
+}
+
+std::streamsize
+charbuf_append_device::write (const char_type* s, std::streamsize n)
+{
+  ccn_charbuf_append (container.getBuf (), s, n);
+  return n;
+}
+
+} // iostreams
+
+} // ndn
