Class Poco::Data::LOB
Author: Applied Informatics Software Engineering GmbH and Contributors

# Poco::Data

# template < typename T >

# class LOB

Library: Data
Package: DataCore
Header: Poco/Data/LOB.h

## Description

Representation of a Large OBject.

A LOB can hold arbitrary data. The maximum size depends on the underlying database.

The LOBInputStream and LOBOutputStream classes provide a convenient way to access the data in a LOB.

## Member Summary

Member Functions: appendRaw, assignRaw, assignVal, begin, clear, compact, content, end, operator !=, operator =, operator ==, rawContent, size, swap

## Types

### Container

typedef typename std::vector < T > Container;

### ContentPtr

typedef Poco::SharedPtr < Container > ContentPtr;

### Iterator

typedef typename std::vector < T >::const_iterator Iterator;

### ValueType

typedef T ValueType;

## Constructors

### LOB

LOB();

Creates an empty LOB.

### LOB

LOB(
const std::vector < T > & content
);

Creates the LOB, content is deep-copied.

### LOB

LOB(
const std::basic_string < T > & content
);

Creates a LOB from a string.

### LOB

LOB(
const LOB & other
);

Creates a LOB by copying another one.

### LOB

LOB(
const T * const pContent,
std::size_t size
);

Creates the LOB by deep-copying pContent.

## Destructor

### ~LOB

~LOB();

Destroys the LOB.

## Member Functions

### appendRaw

void appendRaw(
const T * pChar,
std::size_t count
);

Assigns raw content to internal storage.

### assignRaw

void assignRaw(
const T * ptr,
std::size_t count
);

Assigns raw content to internal storage.

### assignVal

void assignVal(
std::size_t count,
const T & val
);

Assigns raw content to internal storage.

### begin

Iterator begin() const;

### clear

void clear(
bool doCompact = false
);

Clears the content of the blob. If doCompact is true, trims the excess capacity.

### compact

void compact();

Trims the internal storage excess capacity.

### content

const std::vector < T > & content() const;

Returns the content.

### end

Iterator end() const;

### operator !=

bool operator != (
const LOB & other
) const;

Compares for inequality LOB by value.

### operator =

LOB & operator = (
const LOB & other
);

Assignment operator.

### operator ==

bool operator == (
const LOB & other
) const;

Compares for equality LOB by value.

### rawContent

const T * rawContent() const;

Returns the raw content.

If the LOB is empty, returns NULL.

### size

std::size_t size() const;

Returns the size of the LOB in bytes.

### swap

void swap(
LOB & other
);

Swaps the LOB with another one.