Class spng_time.Buffer

All Implemented Interfaces:
AutoCloseable, Iterable<spng_time>, NativeResource, Pointer
Enclosing class:
spng_time

public static class spng_time.Buffer extends StructBuffer<spng_time,spng_time.Buffer> implements NativeResource
An array of spng_time structs.
  • Constructor Details

    • Buffer

      public Buffer(ByteBuffer container)
      Creates a new spng_time.Buffer instance backed by the specified container.

      Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by spng_time.SIZEOF, and its mark will be undefined.

      The created buffer instance holds a strong reference to the container object.

    • Buffer

      public Buffer(long address, int cap)
  • Method Details

    • year

      public short year()
      Returns:
      the value of the year field.
    • month

      public byte month()
      Returns:
      the value of the month field.
    • day

      public byte day()
      Returns:
      the value of the day field.
    • hour

      public byte hour()
      Returns:
      the value of the hour field.
    • minute

      public byte minute()
      Returns:
      the value of the minute field.
    • second

      public byte second()
      Returns:
      the value of the second field.
    • year

      public spng_time.Buffer year(short value)
      Sets the specified value to the year field.
    • month

      public spng_time.Buffer month(byte value)
      Sets the specified value to the month field.
    • day

      public spng_time.Buffer day(byte value)
      Sets the specified value to the day field.
    • hour

      public spng_time.Buffer hour(byte value)
      Sets the specified value to the hour field.
    • minute

      public spng_time.Buffer minute(byte value)
      Sets the specified value to the minute field.
    • second

      public spng_time.Buffer second(byte value)
      Sets the specified value to the second field.