Package jnr.ffi

Class StructLayout.Unsigned16

    • Constructor Detail

      • Unsigned16

        public Unsigned16()
        Creates a new 16 bit integer field.
      • Unsigned16

        public Unsigned16​(StructLayout.Offset offset)
        Creates a new 16 bit unsigned integer field at a specific offset
        Parameters:
        offset - The offset within the memory area for this field.
    • Method Detail

      • get

        public final int get​(Pointer ptr)
        Gets the value for this field.
        Parameters:
        ptr - The pointer to the field.
        Returns:
        a short.
      • set

        public final void set​(Pointer ptr,
                              int value)
        Sets the value for this field.
        Parameters:
        ptr - The pointer to the field.
        value - the 16 bit unsigned value to set.
      • intValue

        public final int intValue​(Pointer ptr)
        Returns a java int representation of this field.
        Specified by:
        intValue in class StructLayout.NumberField
        Parameters:
        ptr - The pointer to the field.
        Returns:
        a java int value for this field.