protected void _writeStartObject ( boolean array ) throws IOException { _writeArrayFieldNameIfNeeded ( ) ; if ( _currentDocument != null ) { //embedded document/array _buffer . putByte ( _typeMarker , array ? BsonConstants . TYPE_ARRAY : BsonConstants . TYPE_DOCUMENT ) ; } _currentDocument = new DocumentInfo ( _currentDocument , _buffer . size ( ) , array ) ; reserveHeader ( ) ; }
Creates a new embedded document or array