mxnet
Classes | Public Member Functions | List of all members
dmlc::istream Class Reference

a std::istream class that can can wrap Stream objects, can use istream with that output to underlying Stream More...

#include <io.h>

Inheritance diagram for dmlc::istream:
Inheritance graph
Collaboration diagram for dmlc::istream:
Collaboration graph

Public Member Functions

 istream (Stream *stream, size_t buffer_size=(1<< 10))
 construct std::ostream type More...
 
virtual ~istream () DMLC_NO_EXCEPTION
 
void set_stream (Stream *stream)
 set internal stream to be stream, reset states More...
 
size_t bytes_read (void) const
 

Detailed Description

a std::istream class that can can wrap Stream objects, can use istream with that output to underlying Stream

Usage example:

Stream *fs = Stream::Create("hdfs:///test.txt", "r");
is >> mydata;
delete fs;

Constructor & Destructor Documentation

dmlc::istream::istream ( Stream stream,
size_t  buffer_size = (1 << 10) 
)
inlineexplicit

construct std::ostream type

Parameters
streamthe Stream output to be used
buffer_sizeinternal buffer size
virtual dmlc::istream::~istream ( )
inlinevirtual

Member Function Documentation

size_t dmlc::istream::bytes_read ( void  ) const
inline
Returns
how many bytes we read so far
void dmlc::istream::set_stream ( Stream stream)
inline

set internal stream to be stream, reset states

Parameters
streamnew stream as output

The documentation for this class was generated from the following file: