C# Class MongoDB.Bson.IO.ByteBufferFactory

Represents a factory for IBsonBuffers.
Afficher le fichier Open project: egametang/Egametang Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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.
Résultat IByteBuffer

LoadFrom() public static méthode

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.
Résultat IByteBuffer