C# Класс MongoDB.Bson.IO.ByteBufferFactory

Represents a factory for IBsonBuffers.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Create ( MongoDB.Bson.IO.BsonChunkPool chunkPool, int fixedCapacity ) : IByteBuffer

Creates a buffer of the specified fixed capacity. Depending on the required capacity, either a SingleChunkBuffer or a MultiChunkBuffer will be created.

LoadFrom ( Stream stream ) : IByteBuffer

Loads a byte buffer from a stream (the first 4 bytes in the stream are the length of the data). Depending on the required capacity, either a SingleChunkBuffer or a MultiChunkBuffer will be created.

Описание методов

Create() публичный статический Метод

Creates a buffer of the specified fixed capacity. Depending on the required capacity, either a SingleChunkBuffer or a MultiChunkBuffer will be created.
public static Create ( MongoDB.Bson.IO.BsonChunkPool chunkPool, int fixedCapacity ) : IByteBuffer
chunkPool MongoDB.Bson.IO.BsonChunkPool The chunk pool.
fixedCapacity int The required capacity.
Результат IByteBuffer

LoadFrom() публичный статический Метод

Loads a byte buffer from a stream (the first 4 bytes in the stream are the length of the data). Depending on the required capacity, either a SingleChunkBuffer or a MultiChunkBuffer will be created.
stream
public static LoadFrom ( Stream stream ) : IByteBuffer
stream Stream The stream.
Результат IByteBuffer