bson/src/main/org/bson/BsonDocument.java
public BsonString getString(final Object key, final BsonString defaultValue) {
        if (!containsKey(key)) {
            return defaultValue;
        }
        return get(key).asString();
    }
public BsonString getString(final Object key, final BsonString defaultValue) {
        if (!containsKey(key)) {
            return defaultValue;
        }
        return get(key).asString();
    }
public BsonString getString ( final Object key , final BsonString defaultValue ) { if ( ! containsKey ( key ) ) { return defaultValue ; } return get ( key ) . asString ( ) ; }
If the document does not contain the given key, return the given default value.  Otherwise, gets the value of the key as a
BsonString.

@param key the key
@param defaultValue the default value
@return the value of the key as a BsonString
@throws org.bson.BsonInvalidOperationException if the document contains the key but the value is not of the expected type
If the document does not contain the given key return the given default value . Otherwise gets the value of the key as a BsonString .