本文整理了Java中org.bson.types.Binary.getType()
方法的一些代码示例,展示了Binary.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binary.getType()
方法的具体详情如下:
包路径:org.bson.types.Binary
类名称:Binary
方法名:getType
暂无
代码示例来源:origin: org.mongodb/mongo-java-driver
@Override
public void serialize(final Object obj, final StringBuilder buf) {
Binary bin = (Binary) obj;
serialize(bin.getData(), bin.getType(), buf);
}
代码示例来源:origin: org.mongodb/mongo-java-driver
@Override
public void encode(final BsonWriter writer, final Binary value, final EncoderContext encoderContext) {
writer.writeBinaryData(new BsonBinary(value.getType(), value.getData()));
}
代码示例来源:origin: org.mongodb/mongo-java-driver
/**
* Encodes a Binary field
*
* @param name the field name
* @param binary the value
* @see org.bson.BsonType#BINARY
*/
protected void putBinary(final String name, final Binary binary) {
putName(name);
bsonWriter.writeBinaryData(new BsonBinary(binary.getType(), binary.getData()));
}
代码示例来源:origin: org.mongodb.mongo-hadoop/mongo-hadoop-spark
private void pickleBinary(final Binary binary, final OutputStream out,
final Pickler pickler)
throws IOException {
out.write(Opcodes.GLOBAL);
out.write("bson.binary\nBinary\n".getBytes());
putBinstring(binary.getData(), out);
pickler.save(binary.getType());
out.write(Opcodes.TUPLE2);
out.write(Opcodes.NEWOBJ);
out.write(Opcodes.EMPTY_DICT);
putBinstring("_Binary__subtype", out);
pickler.save(binary.getType());
out.write(Opcodes.SETITEM);
out.write(Opcodes.BUILD);
}
代码示例来源:origin: fr.opensagres.mongodb/mongo-jee
@Override
protected void serialize(Object obj, Writer writer, OutputStream out)
throws IOException {
Binary bin = (Binary) obj;
serialize(bin.getData(), bin.getType(), writer, out);
}
}
代码示例来源:origin: org.mongodb/mongodb-driver
@Override
public void serialize(final Object obj, final StringBuilder buf) {
Binary bin = (Binary) obj;
serialize(bin.getData(), bin.getType(), buf);
}
代码示例来源:origin: com.sequoiadb/sequoiadb-driver
public void serialize(Object obj, StringBuilder buf) {
Binary bin = (Binary) obj;
serialize(bin.getData(), bin.getType(), buf);
}
代码示例来源:origin: Aresyi/smart-api
protected void putBinary(String name, Binary val) {
this.putBinary(name, val.getType(), val.getData());
}
代码示例来源:origin: com.sequoiadb/sequoiadb-driver
protected void putBinary(String name, Binary val) {
putBinary(name, val.getType(), val.getData());
}
内容来源于网络,如有侵权,请联系作者删除!