Package org.apache.iceberg.variants
Interface VariantMetadata
-
public interface VariantMetadataA variant metadata dictionary.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static java.lang.StringasString(VariantMetadata metadata)intdictionarySize()Returns the size of the metadata dictionary.static VariantMetadataempty()static VariantMetadatafrom(java.nio.ByteBuffer buffer)java.lang.Stringget(int id)Returns the field name for an ID in metadata.intid(java.lang.String name)Returns the ID for anamein the dictionary, or -1 if not present.intsizeInBytes()Returns the serialized size in bytes of this value.intwriteTo(java.nio.ByteBuffer buffer, int offset)Writes this value to the buffer at the given offset, ignoring the buffer's position and limit.
-
-
-
Method Detail
-
id
int id(java.lang.String name)
Returns the ID for anamein the dictionary, or -1 if not present.
-
get
java.lang.String get(int id)
Returns the field name for an ID in metadata.- Throws:
java.util.NoSuchElementException- if the dictionary does not contain the ID
-
dictionarySize
int dictionarySize()
Returns the size of the metadata dictionary.
-
sizeInBytes
int sizeInBytes()
Returns the serialized size in bytes of this value.
-
writeTo
int writeTo(java.nio.ByteBuffer buffer, int offset)Writes this value to the buffer at the given offset, ignoring the buffer's position and limit.sizeInBytes()bytes will be written to the buffer.- Parameters:
buffer- a ByteBuffer to write serialized metadata intooffset- starting offset to write serialized metadata- Returns:
- the number of bytes written
-
from
static VariantMetadata from(java.nio.ByteBuffer buffer)
-
empty
static VariantMetadata empty()
-
asString
static java.lang.String asString(VariantMetadata metadata)
-
-