private void _putString(String name, String s, byte type) { _put(type, name); _putValueString(s); }
private void _putString(String name, String s, int type) { this._put(type, name); this._putValueString(s); }
protected void putCode(String name, Code code) { _put(CODE, name); int temp = _buf.getPosition(); _putValueString(code.getCode()); }
protected void putCode(String name, Code code) { this._put(13, name); int temp = this._buf.getPosition(); this._putValueString(code.getCode()); }
protected void putCodeWScope(String name, CodeWScope code) { _put(CODE_W_SCOPE, name); int temp = _buf.getPosition(); _buf.writeInt(0); _putValueString(code.getCode()); putObject(code.getScope()); _buf.writeInt(temp, _buf.getPosition() - temp); }
protected void putCodeWScope(String name, CodeWScope code) { this._put(15, name); int temp = this._buf.getPosition(); this._buf.writeInt(0); this._putValueString(code.getCode()); this.putObject(code.getScope()); this._buf.writeInt(temp, this._buf.getPosition() - temp); }
_putValueString(val.toString()); return;
} else if(name.equals("$where") && val instanceof String) { this._put((byte) 13, name); this._putValueString(val.toString()); } else { val = BSON.applyEncodingHooks(val);