Java 类org.bson.BsonSymbol 实例源码

项目:drill    文件:TestBsonRecordReader.java   
@Test
public void testSymbolType() throws IOException {
  BsonDocument bsonDoc = new BsonDocument();
  bsonDoc.append("symbolKey", new BsonSymbol("test_symbol"));
  writer.reset();
  bsonReader.write(writer, new BsonDocumentReader(bsonDoc));
  SingleMapReaderImpl mapReader = (SingleMapReaderImpl) writer.getMapVector().getReader();
  assertEquals("test_symbol", mapReader.reader("symbolKey").readText().toString());
}
项目:BsonMapper    文件:BsonSymbolConverter.java   
@Override
public BsonSymbol encode(Symbol object) {
    return new BsonSymbol(object.getSymbol());
}