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.Context
copy()
Copies the values from thisContext
into a new instance.BsonBinaryWriter.Context
getParentContext()
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.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
public BsonBinaryWriter.Context 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.
-
-