Package org.bson
Class BsonBinaryWriter.Context
java.lang.Object
org.bson.AbstractBsonWriter.Context
org.bson.BsonBinaryWriter.Context
- Enclosing class:
- BsonBinaryWriter
An implementation of
AbstractBsonWriter.Context.-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance by copying the values from the given context.Context(BsonBinaryWriter.Context parentContext, BsonContextType contextType, int startPosition) Creates a new instance -
Method Summary
Modifier and TypeMethodDescriptioncopy()Copies the values from thisContextinto a new instance.Returns the parent context.Methods inherited from class org.bson.AbstractBsonWriter.Context
getContextType
-
Constructor Details
-
Context
public Context(BsonBinaryWriter.Context parentContext, BsonContextType contextType, int startPosition) Creates a new instance- Parameters:
parentContext- the context of the parent nodecontextType- the type of this contextstartPosition- the position of the output stream of this writer.
-
Context
Creates a new instance by copying the values from the given context.- Parameters:
from- the Context to copy.
-
-
Method Details
-
getParentContext
Description copied from class:AbstractBsonWriter.ContextReturns the parent context. Allows users of this context object to transition to this parent context.- Overrides:
getParentContextin classAbstractBsonWriter.Context- Returns:
- the context that came before this one
-
copy
Description copied from class:AbstractBsonWriter.ContextCopies the values from thisContextinto a new instance.- Overrides:
copyin classAbstractBsonWriter.Context- Returns:
- the new instance with the same values as this context.
-