com.google.flatbuffers.FlatBufferBuilder.init()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中com.google.flatbuffers.FlatBufferBuilder.init()方法的一些代码示例,展示了FlatBufferBuilder.init()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FlatBufferBuilder.init()方法的具体详情如下:
包路径:com.google.flatbuffers.FlatBufferBuilder
类名称:FlatBufferBuilder
方法名:init

FlatBufferBuilder.init介绍

[英]Alternative initializer that allows reusing this object on an existing ByteBuffer. This method resets the builder's internal state, but keeps objects that have been allocated for temporary storage.
[中]允许在现有ByteBuffer上重用此对象的替代初始值设定项。此方法重置生成器的内部状态,但保留已分配用于临时存储的对象。

代码示例

代码示例来源:origin: com.vlkan/flatbuffers

/**
 * Alternative constructor allowing reuse of {@link ByteBuffer}s.  The builder
 * can still grow the buffer as necessary.  User classes should make sure
 * to call {@link #dataBuffer()} to obtain the resulting encoded message
 *
 * @param existing_bb The byte buffer to reuse
 */
public FlatBufferBuilder(ByteBuffer existing_bb) {
  init(existing_bb);
}

代码示例来源:origin: com.google.flatbuffers/flatbuffers-java

/**
 * Alternative constructor allowing reuse of {@link ByteBuffer}s.  The builder
 * can still grow the buffer as necessary.  User classes should make sure
 * to call {@link #dataBuffer()} to obtain the resulting encoded message.
 *
 * @param existing_bb The byte buffer to reuse.
 * @param bb_factory The factory to be used for allocating a new internal buffer if
 *                   the existing buffer needs to grow
 */
public FlatBufferBuilder(ByteBuffer existing_bb, ByteBufferFactory bb_factory) {
  init(existing_bb, bb_factory);
}

代码示例来源:origin: com.github.davidmoten/flatbuffers-java

/**
 * Alternative constructor allowing reuse of {@link ByteBuffer}s.  The builder
 * can still grow the buffer as necessary.  User classes should make sure
 * to call {@link #dataBuffer()} to obtain the resulting encoded message.
 *
 * @param existing_bb The byte buffer to reuse.
 * @param bb_factory The factory to be used for allocating a new internal buffer if
 *                   the existing buffer needs to grow
 */
public FlatBufferBuilder(ByteBuffer existing_bb, ByteBufferFactory bb_factory) {
  init(existing_bb, bb_factory);
}

代码示例来源:origin: davidmoten/flatbuffers

/**
 * Alternative constructor allowing reuse of {@link ByteBuffer}s.  The builder
 * can still grow the buffer as necessary.  User classes should make sure
 * to call {@link #dataBuffer()} to obtain the resulting encoded message.
 *
 * @param existing_bb The byte buffer to reuse.
 * @param bb_factory The factory to be used for allocating a new internal buffer if
 *                   the existing buffer needs to grow
 */
public FlatBufferBuilder(ByteBuffer existing_bb, ByteBufferFactory bb_factory) {
  init(existing_bb, bb_factory);
}

代码示例来源:origin: flipkart-incubator/kafka-filtering

/**
 * Alternative constructor allowing reuse of {@link java.nio.ByteBuffer}s.  The builder
 * can still grow the buffer as necessary.  User classes should make sure
 * to call {@link #dataBuffer()} to obtain the resulting encoded message
 *
 * @param existing_bb The byte buffer to reuse
 */
public FlatBufferBuilder(ByteBuffer existing_bb) {
  init(existing_bb);
}

代码示例来源:origin: com.google.flatbuffers/flatbuffers-java

/**
 * Alternative constructor allowing reuse of {@link ByteBuffer}s.  The builder
 * can still grow the buffer as necessary.  User classes should make sure
 * to call {@link #dataBuffer()} to obtain the resulting encoded message.
 *
 * @param existing_bb The byte buffer to reuse.
 */
public FlatBufferBuilder(ByteBuffer existing_bb) {
  init(existing_bb, new HeapByteBufferFactory());
}

代码示例来源:origin: com.github.davidmoten/flatbuffers-java

/**
 * Alternative constructor allowing reuse of {@link ByteBuffer}s.  The builder
 * can still grow the buffer as necessary.  User classes should make sure
 * to call {@link #dataBuffer()} to obtain the resulting encoded message.
 *
 * @param existing_bb The byte buffer to reuse.
 */
public FlatBufferBuilder(ByteBuffer existing_bb) {
  init(existing_bb, new HeapByteBufferFactory());
}

代码示例来源:origin: davidmoten/flatbuffers

/**
 * Alternative constructor allowing reuse of {@link ByteBuffer}s.  The builder
 * can still grow the buffer as necessary.  User classes should make sure
 * to call {@link #dataBuffer()} to obtain the resulting encoded message.
 *
 * @param existing_bb The byte buffer to reuse.
 */
public FlatBufferBuilder(ByteBuffer existing_bb) {
  init(existing_bb, new HeapByteBufferFactory());
}

相关文章

微信公众号

最新文章

更多