* Fully reads an embedded document, reusing this parser
* @return the parsed document
* @throws IOException if the document could not be read
*/
protected Map<String, Object> readDocument() throws IOException {
ObjectCodec codec = getCodec();
if (codec == null) {
throw new IllegalStateException("Could not parse embedded document " +
"because BSON parser has no codec");
}
_currToken = handleNewDocument(false);
return codec.readValue(this, new TypeReference<Map<String, Object>>() {});
}