Interface VariantMetadata


public interface VariantMetadata
A variant metadata dictionary.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
     
    int
    Returns the size of the metadata dictionary.
    get(int id)
    Returns the field name for an ID in metadata.
    int
    id(String name)
    Returns the ID for a name in the dictionary, or -1 if not present.
    int
    Returns the serialized size in bytes of this value.
    int
    writeTo(ByteBuffer buffer, int offset)
    Writes this value to the buffer at the given offset, ignoring the buffer's position and limit.
  • 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
    • asString

      static String asString(VariantMetadata metadata)