Package com.sun.jna.platform.win32

# Class SspiUtil.ManagedSecBufferDesc

java.lang.Object
com.sun.jna.Structure
com.sun.jna.platform.win32.Sspi.SecBufferDesc
com.sun.jna.platform.win32.SspiUtil.ManagedSecBufferDesc

Enclosing class:
  SspiUtil

public static class SspiUtil.ManagedSecBufferDesc extends Sspi.SecBufferDesc
The SecBufferDesc structure describes an array of SecBuffer structures to pass from a transport application to a security package.

ManagedSecBufferDesc is a convenience binding, that makes dealing with `SecBufferDesc` easier by providing direct, bound access, to the contained `SecBuffer`s.

ManagedSecBufferDesc assumes, that the size (entry count) of the SecBufferDesc is known at construction time. It is assumed, that this covers all relevant use-cases.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class com.sun.jna.Structure

  `Structure.ByReference, Structure.ByValue, Structure.FieldOrder, Structure.StructField`

- ## Field Summary

  ### Fields inherited from class com.sun.jna.platform.win32.Sspi.SecBufferDesc

  `cBuffers, pBuffers, ulVersion`

  ### Fields inherited from class com.sun.jna.Structure

  `ALIGN_DEFAULT, ALIGN_GNUC, ALIGN_MSVC, ALIGN_NONE, CALCULATE_SIZE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ManagedSecBufferDesc(int bufferCount)`
  `ManagedSecBufferDesc(int type, byte[] token)`
  Create a new SecBufferDesc with initial data.
  `ManagedSecBufferDesc(int type, int tokenSize)`
  Create a new SecBufferDesc with one SecBuffer of a given type and size.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Sspi.SecBuffer`
  `getBuffer(int idx)`
  `void`
  `read()`
  Reads the fields of the struct from native memory
  `void`
  `write()`
  Writes the fields of the struct to native memory

  ### Methods inherited from class com.sun.jna.Structure

  `allocateMemory, allocateMemory, autoAllocate, autoRead, autoRead, autoWrite, autoWrite, cacheTypeInfo, calculateSize, clear, createFieldsOrder, createFieldsOrder, createFieldsOrder, createFieldsOrder, dataEquals, dataEquals, ensureAllocated, equals, fieldOffset, getAutoRead, getAutoWrite, getFieldList, getFieldOrder, getFields, getNativeAlignment, getNativeSize, getNativeSize, getPointer, getStringEncoding, getStructAlignment, hashCode, newInstance, newInstance, readField, readField, setAlignType, setAutoRead, setAutoSynch, setAutoWrite, setStringEncoding, size, sortFields, toArray, toArray, toString, toString, useMemory, useMemory, writeField, writeField, writeField`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ManagedSecBufferDesc

    public ManagedSecBufferDesc(int type, byte[] token)
    Create a new SecBufferDesc with initial data.
    Parameters:
      `type` - Token type.
      `token` - Initial token data.

  - ### ManagedSecBufferDesc

    public ManagedSecBufferDesc(int type, int tokenSize)
    Create a new SecBufferDesc with one SecBuffer of a given type and size.
    Parameters:
      `type` - type
      `tokenSize` - token size

  - ### ManagedSecBufferDesc

    public ManagedSecBufferDesc(int bufferCount)

- ## Method Details

  - ### getBuffer

    public Sspi.SecBuffer getBuffer(int idx)

  - ### write

    public void write()
    Description copied from class: `Structure`
    Writes the fields of the struct to native memory
    Overrides:
      `write` in class `Structure`

  - ### read

    public void read()
    Description copied from class: `Structure`
    Reads the fields of the struct from native memory
    Overrides:
      `read` in class `Structure`