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
ConstructorDescriptionCreates 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 thisContext
into 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.Context
Returns the parent context. Allows users of this context object to transition to this parent context.- Overrides:
getParentContext
in classAbstractBsonWriter.Context
- Returns:
- the context that came before this one
-
copy
Description copied from class:AbstractBsonWriter.Context
Copies the values from thisContext
into a new instance.- Overrides:
copy
in classAbstractBsonWriter.Context
- Returns:
- the new instance with the same values as this context.
-