C# Class MongoDB.Bson.IO.ByteBufferFactory

Represents a factory for IBsonBuffers.
Mostrar archivo Open project: egametang/Egametang Class Usage Examples

Public Methods

Method Description
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.

Method Details

Create() public static method

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.
return IByteBuffer

LoadFrom() public static method

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.
return IByteBuffer