public class BsonBinaryWriter extends AbstractBsonWriter
| 限定符和类型 | 类和说明 |
|---|---|
protected class |
BsonBinaryWriter.Context |
protected class |
BsonBinaryWriter.Mark |
AbstractBsonWriter.State| 构造器和说明 |
|---|
BsonBinaryWriter(BsonOutput bsonOutput)
Construct an instance.
|
BsonBinaryWriter(BsonOutput bsonOutput,
FieldNameValidator validator)
Construct an instance.
|
BsonBinaryWriter(BsonWriterSettings settings,
BsonBinaryWriterSettings binaryWriterSettings,
BsonOutput bsonOutput)
Construct an instance.
|
BsonBinaryWriter(BsonWriterSettings settings,
BsonBinaryWriterSettings binaryWriterSettings,
BsonOutput bsonOutput,
FieldNameValidator validator)
Construct an instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
protected void |
doWriteBinaryData(BsonBinary value)
Handles the logic of writing a
BsonBinary value |
void |
doWriteBoolean(boolean value)
Handles the logic of writing a boolean value
|
protected void |
doWriteDateTime(long value)
Handles the logic of writing a date time value
|
protected void |
doWriteDBPointer(BsonDbPointer value)
Handles the logic of writing a DbPointer value
|
protected void |
doWriteDouble(double value)
Handles the logic of writing a Double value
|
protected void |
doWriteEndArray()
Handles the logic of writing the end of an array
|
protected void |
doWriteEndDocument()
Handles the logic of writing the end of a document
|
protected void |
doWriteInt32(int value)
Handles the logic of writing an int32 value
|
protected void |
doWriteInt64(long value)
Handles the logic of writing an int64 value
|
protected void |
doWriteJavaScript(java.lang.String value)
Handles the logic of writing a JavaScript function
|
protected void |
doWriteJavaScriptWithScope(java.lang.String value)
Handles the logic of writing a scoped JavaScript function
|
protected void |
doWriteMaxKey()
Handles the logic of writing a Max key
|
protected void |
doWriteMinKey()
Handles the logic of writing a Min key
|
void |
doWriteNull()
Handles the logic of writing a Null value
|
void |
doWriteObjectId(ObjectId value)
Handles the logic of writing an ObjectId
|
void |
doWriteRegularExpression(BsonRegularExpression value)
Handles the logic of writing a regular expression
|
protected void |
doWriteStartArray()
Handles the logic to start writing an array
|
protected void |
doWriteStartDocument()
Handles the logic to start writing a document
|
void |
doWriteString(java.lang.String value)
Handles the logic of writing a String
|
void |
doWriteSymbol(java.lang.String value)
Handles the logic of writing a Symbol
|
void |
doWriteTimestamp(BsonTimestamp value)
Handles the logic of writing a timestamp
|
void |
doWriteUndefined()
Handles the logic of writing an Undefined value
|
void |
flush()
Flushes any pending data to the output destination.
|
BsonOutput |
getBsonOutput()
Gets the BSON output backing this instance.
|
protected BsonBinaryWriter.Context |
getContext()
Get the context, which will indicate which state the writer is in, for example which part of a document it's currently writing.
|
void |
mark()
Create a snapshot of this writer's context at a point in time.
|
void |
pipe(BsonReader reader)
Reads a single document from a BsonReader and writes it to this.
|
void |
popMaxDocumentSize()
Reset the maximum document size to its previous value.
|
void |
pushMaxDocumentSize(int maxDocumentSize)
Sets a maximum size for documents from this point.
|
void |
reset()
Resets this writer to the last
mark() saved. |
checkPreconditions, checkState, getName, getNextState, getState, isClosed, setContext, setState, throwInvalidContextType, throwInvalidState, writeBinaryData, writeBinaryData, writeBoolean, writeBoolean, writeDateTime, writeDateTime, writeDBPointer, writeDBPointer, 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, writeUndefinedpublic BsonBinaryWriter(BsonOutput bsonOutput, FieldNameValidator validator)
bsonOutput - the output to write tovalidator - the field name validator to applypublic BsonBinaryWriter(BsonOutput bsonOutput)
bsonOutput - the output to write topublic BsonBinaryWriter(BsonWriterSettings settings, BsonBinaryWriterSettings binaryWriterSettings, BsonOutput bsonOutput)
settings - the generic BsonWriter settingsbinaryWriterSettings - the settings specific to a BsonBinaryWriterbsonOutput - the output to write topublic BsonBinaryWriter(BsonWriterSettings settings, BsonBinaryWriterSettings binaryWriterSettings, BsonOutput bsonOutput, FieldNameValidator validator)
settings - the generic BsonWriter settingsbinaryWriterSettings - the settings specific to a BsonBinaryWriterbsonOutput - the output to write tovalidator - the field name validator to applypublic void close()
close 在接口中 java.io.Closeableclose 在接口中 java.lang.AutoCloseableclose 在类中 AbstractBsonWriterpublic BsonOutput getBsonOutput()
public void flush()
BsonWriterprotected BsonBinaryWriter.Context getContext()
AbstractBsonWritergetContext 在类中 AbstractBsonWriterprotected void doWriteStartDocument()
AbstractBsonWriterdoWriteStartDocument 在类中 AbstractBsonWriterprotected void doWriteEndDocument()
AbstractBsonWriterdoWriteEndDocument 在类中 AbstractBsonWriterprotected void doWriteStartArray()
AbstractBsonWriterdoWriteStartArray 在类中 AbstractBsonWriterprotected void doWriteEndArray()
AbstractBsonWriterdoWriteEndArray 在类中 AbstractBsonWriterprotected void doWriteBinaryData(BsonBinary value)
AbstractBsonWriterBsonBinary valuedoWriteBinaryData 在类中 AbstractBsonWritervalue - the BsonBinary value to writepublic void doWriteBoolean(boolean value)
AbstractBsonWriterdoWriteBoolean 在类中 AbstractBsonWritervalue - the boolean value to writeprotected void doWriteDateTime(long value)
AbstractBsonWriterdoWriteDateTime 在类中 AbstractBsonWritervalue - the long value to writeprotected void doWriteDBPointer(BsonDbPointer value)
AbstractBsonWriterdoWriteDBPointer 在类中 AbstractBsonWritervalue - the BsonDbPointer value to writeprotected void doWriteDouble(double value)
AbstractBsonWriterdoWriteDouble 在类中 AbstractBsonWritervalue - the double value to writeprotected void doWriteInt32(int value)
AbstractBsonWriterdoWriteInt32 在类中 AbstractBsonWritervalue - the int value to writeprotected void doWriteInt64(long value)
AbstractBsonWriterdoWriteInt64 在类中 AbstractBsonWritervalue - the long value to writeprotected void doWriteJavaScript(java.lang.String value)
AbstractBsonWriterdoWriteJavaScript 在类中 AbstractBsonWritervalue - the String value to writeprotected void doWriteJavaScriptWithScope(java.lang.String value)
AbstractBsonWriterdoWriteJavaScriptWithScope 在类中 AbstractBsonWritervalue - the boolean value to writeprotected void doWriteMaxKey()
AbstractBsonWriterdoWriteMaxKey 在类中 AbstractBsonWriterprotected void doWriteMinKey()
AbstractBsonWriterdoWriteMinKey 在类中 AbstractBsonWriterpublic void doWriteNull()
AbstractBsonWriterdoWriteNull 在类中 AbstractBsonWriterpublic void doWriteObjectId(ObjectId value)
AbstractBsonWriterdoWriteObjectId 在类中 AbstractBsonWritervalue - the ObjectId value to writepublic void doWriteRegularExpression(BsonRegularExpression value)
AbstractBsonWriterdoWriteRegularExpression 在类中 AbstractBsonWritervalue - the BsonRegularExpression value to writepublic void doWriteString(java.lang.String value)
AbstractBsonWriterdoWriteString 在类中 AbstractBsonWritervalue - the String value to writepublic void doWriteSymbol(java.lang.String value)
AbstractBsonWriterdoWriteSymbol 在类中 AbstractBsonWritervalue - the boolean value to writepublic void doWriteTimestamp(BsonTimestamp value)
AbstractBsonWriterdoWriteTimestamp 在类中 AbstractBsonWritervalue - the BsonTimestamp value to writepublic void doWriteUndefined()
AbstractBsonWriterdoWriteUndefined 在类中 AbstractBsonWriterpublic void pipe(BsonReader reader)
BsonWriterpipe 在接口中 BsonWriterpipe 在类中 AbstractBsonWriterreader - The source.public void pushMaxDocumentSize(int maxDocumentSize)
maxDocumentSize - the maximum document size.public void popMaxDocumentSize()
public void mark()