Microsoft Information Protection (MIP) SDK for C++: Reference 1.15
Doxygen-generated documentation for MIP SDK written in C++
Loading...
Searching...
No Matches
stream_utils.h File Reference
#include <future>
#include <memory>
#include <string>
#include <vector>
#include "mip/mip_export.h"
#include "mip/mip_namespace.h"
#include "mip/stream.h"
+ Include dependency graph for stream_utils.h:

Go to the source code of this file.

Functions

MIP_API std::shared_ptr< mip::Stream > CreateStreamFromBuffer (uint8_t *buffer, const int64_t size)
 Creates an Stream from a buffer.
 
MIP_API std::shared_ptr< mip::Stream > CreateStreamFromStdStream (const std::shared_ptr< std::iostream > &stdIOStream)
 Creates a Stream from a std::iostream.
 
MIP_API std::shared_ptr< mip::Stream > CreateStreamFromStdStream (const std::shared_ptr< std::istream > &stdIStream)
 Creates a Stream from a std::istream.
 
MIP_API std::shared_ptr< mip::Stream > CreateStreamFromStdStream (const std::shared_ptr< std::ostream > &stdOStream)
 Creates a Stream from a std::ostream.
 
MIP_API std::vector< uint8_t > ReadFromStream (const std::shared_ptr< mip::Stream > &stream)
 Read all the bytes of stream.
 

Function Documentation

◆ CreateStreamFromBuffer()

MIP_API std::shared_ptr< mip::Stream > CreateStreamFromBuffer ( uint8_t * buffer,
const int64_t size )

Creates an Stream from a buffer.

Parameters
bufferPointer to a buffer
Returns
size Size of buffer

◆ CreateStreamFromStdStream() [1/3]

MIP_API std::shared_ptr< mip::Stream > CreateStreamFromStdStream ( const std::shared_ptr< std::iostream > & stdIOStream)

Creates a Stream from a std::iostream.

Parameters
stdIOStreamBacking std::iostream
Returns
Stream wrapping a std::iostream

◆ CreateStreamFromStdStream() [2/3]

MIP_API std::shared_ptr< mip::Stream > CreateStreamFromStdStream ( const std::shared_ptr< std::istream > & stdIStream)

Creates a Stream from a std::istream.

Parameters
stdIStreamBacking std::istream
Returns
Stream wrapping a std::istream

◆ CreateStreamFromStdStream() [3/3]

MIP_API std::shared_ptr< mip::Stream > CreateStreamFromStdStream ( const std::shared_ptr< std::ostream > & stdOStream)

Creates a Stream from a std::ostream.

Parameters
stdOStreamBacking std::ostream
Returns
Stream wrapping a std::ostream

◆ ReadFromStream()

MIP_API std::vector< uint8_t > ReadFromStream ( const std::shared_ptr< mip::Stream > & stream)

Read all the bytes of stream.

Parameters
pointerto a stream.
Returns
a vector of bytes.