Interface VariantMetadata


  • public interface VariantMetadata
    A variant metadata dictionary.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static java.lang.String asString​(VariantMetadata metadata)  
      int dictionarySize()
      Returns the size of the metadata dictionary.
      static VariantMetadata empty()  
      static VariantMetadata from​(java.nio.ByteBuffer buffer)  
      java.lang.String get​(int id)
      Returns the field name for an ID in metadata.
      int id​(java.lang.String name)
      Returns the ID for a name in the dictionary, or -1 if not present.
      int sizeInBytes()
      Returns the serialized size in bytes of this value.
      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.
    • Method Detail

      • id

        int id​(java.lang.String name)
        Returns the ID for a name in 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 into
        offset - starting offset to write serialized metadata
        Returns:
        the number of bytes written
      • asString

        static java.lang.String asString​(VariantMetadata metadata)