org.apache.arrow.flatbuf.BodyCompression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of arrow-format Show documentation
Show all versions of arrow-format Show documentation
Generated Java files from the IPC Flatbuffer definitions.
// automatically generated by the FlatBuffers compiler, do not modify
package org.apache.arrow.flatbuf;
import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;
@SuppressWarnings("unused")
/**
* Optional compression for the memory buffers constituting IPC message
* bodies. Intended for use with RecordBatch but could be used for other
* message types
*/
public final class BodyCompression extends Table {
public static BodyCompression getRootAsBodyCompression(ByteBuffer _bb) { return getRootAsBodyCompression(_bb, new BodyCompression()); }
public static BodyCompression getRootAsBodyCompression(ByteBuffer _bb, BodyCompression obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
public BodyCompression __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
/**
* Compressor library
*/
public byte codec() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; }
/**
* Indicates the way the record batch body was compressed
*/
public byte method() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; }
public static int createBodyCompression(FlatBufferBuilder builder,
byte codec,
byte method) {
builder.startObject(2);
BodyCompression.addMethod(builder, method);
BodyCompression.addCodec(builder, codec);
return BodyCompression.endBodyCompression(builder);
}
public static void startBodyCompression(FlatBufferBuilder builder) { builder.startObject(2); }
public static void addCodec(FlatBufferBuilder builder, byte codec) { builder.addByte(0, codec, 0); }
public static void addMethod(FlatBufferBuilder builder, byte method) { builder.addByte(1, method, 0); }
public static int endBodyCompression(FlatBufferBuilder builder) {
int o = builder.endObject();
return o;
}
}