Package org.bson

Class BsonBinaryWriter

All Implemented Interfaces:
Closeable, AutoCloseable, BsonWriter

public class BsonBinaryWriter extends AbstractBsonWriter
A BsonWriter implementation that writes to a binary stream of data. This is the most commonly used implementation.
Since:
3.0
  • Constructor Details

    • BsonBinaryWriter

      public BsonBinaryWriter(BsonOutput bsonOutput, FieldNameValidator validator)
      Construct an instance.
      Parameters:
      bsonOutput - the output to write to
      validator - the field name validator to apply
    • BsonBinaryWriter

      public BsonBinaryWriter(BsonOutput bsonOutput)
      Construct an instance.
      Parameters:
      bsonOutput - the output to write to
    • BsonBinaryWriter

      public BsonBinaryWriter(BsonWriterSettings settings, BsonBinaryWriterSettings binaryWriterSettings, BsonOutput bsonOutput)
      Construct an instance.
      Parameters:
      settings - the generic BsonWriter settings
      binaryWriterSettings - the settings specific to a BsonBinaryWriter
      bsonOutput - the output to write to
    • BsonBinaryWriter

      public BsonBinaryWriter(BsonWriterSettings settings, BsonBinaryWriterSettings binaryWriterSettings, BsonOutput bsonOutput, FieldNameValidator validator)
      Construct an instance.
      Parameters:
      settings - the generic BsonWriter settings
      binaryWriterSettings - the settings specific to a BsonBinaryWriter
      bsonOutput - the output to write to
      validator - the field name validator to apply
  • Method Details