Index: /trunk/nv/io/std_stream.hh
===================================================================
--- /trunk/nv/io/std_stream.hh	(revision 137)
+++ /trunk/nv/io/std_stream.hh	(revision 138)
@@ -16,13 +16,15 @@
 #include <nv/interface/stream.hh>
 #include <streambuf>
+#include <istream>
 #include <vector>
 
 namespace nv
 {
-	class std_stream : public std::streambuf
+
+	class std_streambuf : public std::streambuf
 	{
 	public:
-		explicit std_stream( stream* source, bool owner = false, std::size_t bsize = 256, std::size_t put_back = 8 );
-		~std_stream();
+		explicit std_streambuf( stream* source, bool owner = false, std::size_t bsize = 256, std::size_t put_back = 8 );
+		virtual ~std_streambuf();
 	protected:
 		stream*           m_stream;
@@ -31,7 +33,18 @@
 		std::size_t       m_put_back;
 	private:
-		std_stream( const std_stream& );             // dissalow copy
-		std_stream *operator =( const std_stream& ); // dissalow assign
+		std_streambuf( const std_streambuf& );             // dissalow copy
+		std_streambuf *operator =( const std_streambuf& ); // dissalow assign
 		int_type underflow();
+	};
+
+	class std_stream : public std::istream
+	{
+	public:
+		explicit std_stream( stream* source, bool owner = false, std::size_t bsize = 256, std::size_t put_back = 8 )
+			: std::istream( &m_streambuf )
+			, m_streambuf( source, owner, bsize, put_back ) 
+		{}
+	private:
+		std_streambuf m_streambuf;
 	};
 
Index: /trunk/src/formats/obj_loader.cc
===================================================================
--- /trunk/src/formats/obj_loader.cc	(revision 137)
+++ /trunk/src/formats/obj_loader.cc	(revision 138)
@@ -6,4 +6,5 @@
 
 #include "nv/formats/obj_loader.hh"
+#include "nv/io/std_stream.hh"
 #include <sstream>
 
@@ -187,9 +188,5 @@
 	m_mesh = new mesh();
 	mesh_obj_reader reader( m_mesh );
-	size_t size = source.size();
-	char* data  = new char[ size ];
-	source.read( data, 1, size );
-	std::string cache( data, size );
-	std::istringstream sstream( cache );
+	std_stream sstream( &source );
 	reader.read_stream( sstream );
 	m_size = reader.size;
Index: /trunk/src/io/std_stream.cc
===================================================================
--- /trunk/src/io/std_stream.cc	(revision 137)
+++ /trunk/src/io/std_stream.cc	(revision 138)
@@ -9,9 +9,8 @@
 #include "nv/io/std_stream.hh"
 #include <algorithm>
-#include <cstring> // TODO: remove, see below
 
 using namespace nv;
 
-std_stream::std_stream( stream* source, bool owner /*= false*/, std::size_t bsize /*= 256*/, std::size_t put_back /*= 8 */ )
+std_streambuf::std_streambuf( stream* source, bool owner /*= false*/, std::size_t bsize /*= 256*/, std::size_t put_back /*= 8 */ )
 	: m_stream( source )
 	, m_owner( owner )
@@ -23,5 +22,5 @@
 }
 
-std_stream::~std_stream()
+std_streambuf::~std_streambuf()
 {
 	if ( m_owner )
@@ -31,5 +30,5 @@
 }
 
-std_stream::int_type std_stream::underflow()
+std_streambuf::int_type std_streambuf::underflow()
 {
 	if (gptr() < egptr())
@@ -45,6 +44,5 @@
 	{
 		// Make arrangements for putback characters
-		// TODO: std::copy( egptr() - m_put_back, egptr(), base ); instead?
-		std::memmove(base, egptr() - m_put_back, m_put_back);
+		std::copy( egptr() - m_put_back, egptr(), base ); 
 		start += m_put_back;
 	}
