bson/src/main/org/bson/RawBsonDocument.java
public <T> T decode(final Codec<T> codec) {
        return decode((Decoder<T>) codec);
    }
public <T> T decode(final Codec<T> codec) {
        return decode((Decoder<T>) codec);
    }
Decode this into a document.

@param codec the codec to facilitate the transformation
@param <T>   the BSON type that the codec encodes/decodes
@return the decoded document