本文整理汇总了Java中org.bson.BsonWriter.writeInt32方法的典型用法代码示例。如果您正苦于以下问题:Java BsonWriter.writeInt32方法的具体用法?Java BsonWriter.writeInt32怎么用?Java BsonWriter.writeInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bson.BsonWriter
的用法示例。
在下文中一共展示了BsonWriter.writeInt32方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: encode
import org.bson.BsonWriter; //导入方法依赖的package包/类
@Override
public void encode(
BsonWriter writer,
ZoneOffset value,
EncoderContext encoderContext) {
writer.writeInt32(value.getTotalSeconds());
}
示例2: encode
import org.bson.BsonWriter; //导入方法依赖的package包/类
@Override
public void encode(
BsonWriter writer,
Year value,
EncoderContext encoderContext) {
writer.writeInt32(value.getValue());
}
示例3: writeLockingVersion
import org.bson.BsonWriter; //导入方法依赖的package包/类
private void writeLockingVersion(BsonWriter writer, T instance) {
try {
writer.writeName(getMappedFieldName());
int lockingVersion = field.getInt(instance) + 1;
writer.writeInt32(lockingVersion);
} catch (IllegalAccessException e) {
LOGGER.warn("IllegalAccessException while writeLockingVersion field " + field.getName(), e);
}
}
示例4: encodeInternal
import org.bson.BsonWriter; //导入方法依赖的package包/类
@Override
public <T> void encodeInternal(BsonWriter writer, T instance, Field field) throws IllegalAccessException {
writer.writeInt32(field.getByte(instance));
}
示例5: encode
import org.bson.BsonWriter; //导入方法依赖的package包/类
@Override
public void encode(BsonWriter writer, Object value, EncoderContext encoderContext) {
for (char i : (char[]) value) {
writer.writeInt32(i);
}
}
示例6: encode
import org.bson.BsonWriter; //导入方法依赖的package包/类
@Override
public void encode(BsonWriter bsonWriter, Integer value) {
bsonWriter.writeInt32(value);
}