Interface VariantMetadata


public interface VariantMetadata
A variant metadata dictionary.
  • Method Details

    • id

      int id(String name)
      Returns the ID for a name in the dictionary, or -1 if not present.
    • get

      String get(int id)
      Returns the field name for an ID in metadata.
      Throws:
      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(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 into
      offset - starting offset to write serialized metadata
      Returns:
      the number of bytes written
    • from

      static VariantMetadata from(ByteBuffer buffer)
    • empty

      static VariantMetadata empty()
    • asString

      static String asString(VariantMetadata metadata)