# Poco::MongoDB

# class Binary

Library: MongoDB
Package: MongoDB
Header: Poco/MongoDB/Binary.h

## Description

Implements BSON Binary. It's a wrapper around a Poco::Buffer<unsigned char>.

## Member Summary

Member Functions: buffer, subtype, toString

## Types

### Ptr

typedef SharedPtr < Binary > Ptr;

## Constructors

### Binary

Binary();

Constructor

### Binary

Binary(
Poco::Int32 size,
unsigned char subtype
);

Constructor

## Destructor

### ~Binary

virtual ~Binary();

Destructor

## Member Functions

### buffer

Buffer < unsigned char > & buffer();

Returns a reference to the buffer

### subtype

unsigned char subtype() const;

Returns the subtype

### subtype

void subtype(
unsigned char type
);

Sets the subtype

### toString

std::string toString(
int indent = 0
) const;

Returns the binary encoded in Base64