Package org.bson
Class BsonBinaryWriter.Context
- java.lang.Object
-
- org.bson.AbstractBsonWriter.Context
-
- org.bson.BsonBinaryWriter.Context
-
- Enclosing class:
- BsonBinaryWriter
protected class BsonBinaryWriter.Context extends AbstractBsonWriter.Context
-
-
Constructor Summary
Constructors Constructor Description Context(BsonBinaryWriter.Context from)Creates 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BsonBinaryWriter.Contextcopy()Copies the values from thisContextinto a new instance.BsonBinaryWriter.ContextgetParentContext()Returns the parent context.-
Methods inherited from class org.bson.AbstractBsonWriter.Context
getContextType
-
-
-
-
Constructor Detail
-
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
public Context(BsonBinaryWriter.Context from)
Creates a new instance by copying the values from the given context.- Parameters:
from- the Context to copy.
-
-
Method Detail
-
getParentContext
public BsonBinaryWriter.Context 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
public BsonBinaryWriter.Context 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.
-
-