Package org.bson
Class BsonBinaryWriter
java.lang.Object
org.bson.AbstractBsonWriter
org.bson.BsonBinaryWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,BsonWriter
Deprecated.
Usage of this API is not supported in AEM as a Cloud Service.
A BsonWriter implementation that writes to a binary stream of data. This is the most commonly used implementation.
- Since:
- 3.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bson.AbstractBsonWriter
AbstractBsonWriter.State -
Constructor Summary
ConstructorsConstructorDescriptionBsonBinaryWriter(BsonWriterSettings settings, BsonBinaryWriterSettings binaryWriterSettings, BsonOutput bsonOutput) Deprecated.Construct an instance.BsonBinaryWriter(BsonWriterSettings settings, BsonBinaryWriterSettings binaryWriterSettings, BsonOutput bsonOutput, FieldNameValidator validator) Deprecated.Construct an instance.BsonBinaryWriter(BsonOutput bsonOutput) Deprecated.Construct an instance.BsonBinaryWriter(BsonOutput bsonOutput, FieldNameValidator validator) Deprecated.Construct an instance. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.voiddoWriteBoolean(boolean value) Deprecated.voidDeprecated.voiddoWriteObjectId(ObjectId value) Deprecated.voidDeprecated.voiddoWriteString(String value) Deprecated.voiddoWriteSymbol(String value) Deprecated.voiddoWriteTimestamp(BsonTimestamp value) Deprecated.voidDeprecated.voidflush()Deprecated.Flushes any pending data to the output destination.Deprecated.Deprecated.Gets the BSON output backing this instance.voidmark()Deprecated.Create a snapshot of this writer's context at a point in time.voidpipe(BsonReader reader) Deprecated.Reads a single document from a BsonReader and writes it to this.voidpipe(BsonReader reader, List<BsonElement> extraElements) Deprecated.Reads a single document from the given BsonReader and writes it to this, appending the given extra elements to the document.voidDeprecated.Reset the maximum document size to its previous value.voidpushMaxDocumentSize(int maxDocumentSize) Deprecated.Sets a maximum size for documents from this point.voidreset()Deprecated.Resets this writer to the lastmark()saved.Methods inherited from class org.bson.AbstractBsonWriter
writeBinaryData, writeBinaryData, writeBoolean, writeBoolean, writeDateTime, writeDateTime, writeDBPointer, writeDBPointer, writeDecimal128, writeDecimal128, writeDouble, writeDouble, writeEndArray, writeEndDocument, writeInt32, writeInt32, writeInt64, writeInt64, writeJavaScript, writeJavaScript, writeJavaScriptWithScope, writeJavaScriptWithScope, writeMaxKey, writeMaxKey, writeMinKey, writeMinKey, writeName, writeNull, writeNull, writeObjectId, writeObjectId, writeRegularExpression, writeRegularExpression, writeStartArray, writeStartArray, writeStartDocument, writeStartDocument, writeString, writeString, writeSymbol, writeSymbol, writeTimestamp, writeTimestamp, writeUndefined, writeUndefined
-
Constructor Details
-
BsonBinaryWriter
Deprecated.Construct an instance.- Parameters:
bsonOutput- the output to write tovalidator- the field name validator to apply
-
BsonBinaryWriter
Deprecated.Construct an instance.- Parameters:
bsonOutput- the output to write to
-
BsonBinaryWriter
public BsonBinaryWriter(BsonWriterSettings settings, BsonBinaryWriterSettings binaryWriterSettings, BsonOutput bsonOutput) Deprecated.Construct an instance.- Parameters:
settings- the generic BsonWriter settingsbinaryWriterSettings- the settings specific to a BsonBinaryWriterbsonOutput- the output to write to
-
BsonBinaryWriter
public BsonBinaryWriter(BsonWriterSettings settings, BsonBinaryWriterSettings binaryWriterSettings, BsonOutput bsonOutput, FieldNameValidator validator) Deprecated.Construct an instance.- Parameters:
settings- the generic BsonWriter settingsbinaryWriterSettings- the settings specific to a BsonBinaryWriterbsonOutput- the output to write tovalidator- the field name validator to apply
-
-
Method Details
-
close
public void close()Deprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classAbstractBsonWriter
-
getBsonOutput
Deprecated.Gets the BSON output backing this instance.- Returns:
- the BSON output
-
getBinaryWriterSettings
Deprecated.- Returns:
- the BsonBinaryWriterSettings
- Since:
- 3.6
-
flush
public void flush()Deprecated.Description copied from interface:BsonWriterFlushes any pending data to the output destination. -
doWriteBoolean
public void doWriteBoolean(boolean value) Deprecated. -
doWriteNull
public void doWriteNull()Deprecated. -
doWriteObjectId
Deprecated. -
doWriteRegularExpression
Deprecated. -
doWriteString
Deprecated. -
doWriteSymbol
Deprecated. -
doWriteTimestamp
Deprecated. -
doWriteUndefined
public void doWriteUndefined()Deprecated. -
pipe
Deprecated.Description copied from interface:BsonWriterReads a single document from a BsonReader and writes it to this.- Specified by:
pipein interfaceBsonWriter- Overrides:
pipein classAbstractBsonWriter- Parameters:
reader- The source.
-
pipe
Deprecated.Description copied from class:AbstractBsonWriterReads a single document from the given BsonReader and writes it to this, appending the given extra elements to the document.- Overrides:
pipein classAbstractBsonWriter- Parameters:
reader- the source of the documentextraElements- the extra elements to append to the document
-
pushMaxDocumentSize
public void pushMaxDocumentSize(int maxDocumentSize) Deprecated.Sets a maximum size for documents from this point.- Parameters:
maxDocumentSize- the maximum document size.
-
popMaxDocumentSize
public void popMaxDocumentSize()Deprecated.Reset the maximum document size to its previous value. -
mark
public void mark()Deprecated.Create a snapshot of this writer's context at a point in time. -
reset
public void reset()Deprecated.Resets this writer to the lastmark()saved.- Throws:
IllegalStateException- ifmark()was not called prior to reset.
-