Module jcifs

Class SecurityDescriptor

java.lang.Object
org.codelibs.jcifs.smb1.SecurityDescriptor

public class SecurityDescriptor extends Object
Represents a Windows security descriptor containing access control information. This class encodes and decodes security descriptors that define ownership and access permissions for SMB resources.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    ACE[]
    The array of access control entries (ACEs) in this security descriptor.
    int
    The type flags indicating security descriptor control flags.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an empty security descriptor.
    SecurityDescriptor(byte[] buffer, int bufferIndex, int len)
    Creates a security descriptor by decoding from a byte buffer.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    decode(byte[] buffer, int bufferIndex, int len)
    Decodes a security descriptor from a byte buffer.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • type

      public int type
      The type flags indicating security descriptor control flags.
    • aces

      public ACE[] aces
      The array of access control entries (ACEs) in this security descriptor.
  • Constructor Details

    • SecurityDescriptor

      public SecurityDescriptor()
      Creates an empty security descriptor.
    • SecurityDescriptor

      public SecurityDescriptor(byte[] buffer, int bufferIndex, int len) throws IOException
      Creates a security descriptor by decoding from a byte buffer.
      Parameters:
      buffer - the byte buffer containing the security descriptor data
      bufferIndex - the starting offset in the buffer
      len - the length of data to decode
      Throws:
      IOException - if an I/O error occurs during decoding
  • Method Details

    • decode

      public int decode(byte[] buffer, int bufferIndex, int len) throws IOException
      Decodes a security descriptor from a byte buffer.
      Parameters:
      buffer - the byte buffer containing the security descriptor data
      bufferIndex - the starting offset in the buffer
      len - the length of data to decode
      Returns:
      the number of bytes decoded
      Throws:
      IOException - if an I/O error occurs during decoding
    • toString

      public String toString()
      Overrides:
      toString in class Object