Module jcifs

Class SmbComOpenAndXResponse

All Implemented Interfaces:
CommonServerMessageBlock, CommonServerMessageBlockRequest, CommonServerMessageBlockResponse, RequestWithPath, SmbBasicFileInfo, Message, Request, Response

public class SmbComOpenAndXResponse extends AndXServerMessageBlock implements SmbBasicFileInfo
SMB1 Open AndX Response message. This response contains information about the opened file, including file ID, attributes, size, and access permissions.
  • Constructor Details

    • SmbComOpenAndXResponse

      public SmbComOpenAndXResponse(Configuration config)
      Constructs an Open AndX response.
      Parameters:
      config - the configuration
    • SmbComOpenAndXResponse

      public SmbComOpenAndXResponse(Configuration config, SmbComSeekResponse andxResp)
      Constructs an Open AndX response with a chained response.
      Parameters:
      config - the configuration
      andxResp - the chained seek response
  • Method Details

    • getFid

      public final int getFid()
      Gets the file identifier.
      Returns:
      the fid
    • getDataSize

      public final int getDataSize()
      Gets the file data size.
      Returns:
      the dataSize
    • getSize

      public long getSize()
      Gets the file size in bytes.
      Specified by:
      getSize in interface SmbBasicFileInfo
      Returns:
      file size
      See Also:
    • getGrantedAccess

      public final int getGrantedAccess()
      Gets the granted access rights.
      Returns:
      the grantedAccess
    • getFileAttributes

      public final int getFileAttributes()
      Gets the file attributes.
      Returns:
      the fileAttributes
    • getAttributes

      public int getAttributes()
      Gets the file attributes.
      Specified by:
      getAttributes in interface SmbBasicFileInfo
      Returns:
      file attributes
      See Also:
    • getFileType

      public final int getFileType()
      Gets the file type.
      Returns:
      the fileType
    • getDeviceState

      public final int getDeviceState()
      Gets the device state.
      Returns:
      the deviceState
    • getAction

      public final int getAction()
      Gets the action taken.
      Returns:
      the action
    • getServerFid

      public final int getServerFid()
      Gets the server file identifier.
      Returns:
      the serverFid
    • getLastWriteTime

      public final long getLastWriteTime()
      Description copied from interface: SmbBasicFileInfo
      Gets the file last write time.
      Specified by:
      getLastWriteTime in interface SmbBasicFileInfo
      Returns:
      the lastWriteTime
    • getCreateTime

      public long getCreateTime()
      Gets the file creation time.
      Specified by:
      getCreateTime in interface SmbBasicFileInfo
      Returns:
      file create time
      See Also:
    • getLastAccessTime

      public long getLastAccessTime()
      Gets the file last access time.
      Specified by:
      getLastAccessTime in interface SmbBasicFileInfo
      Returns:
      file last access time
      See Also:
    • writeParameterWordsWireFormat

      protected int writeParameterWordsWireFormat(byte[] dst, int dstIndex)
      Description copied from class: ServerMessageBlock
      Writes the parameter words portion of the SMB message to the wire format.
      Specified by:
      writeParameterWordsWireFormat in class ServerMessageBlock
      Parameters:
      dst - the destination buffer
      dstIndex - the starting offset in the buffer
      Returns:
      the number of bytes written
    • writeBytesWireFormat

      protected int writeBytesWireFormat(byte[] dst, int dstIndex)
      Description copied from class: ServerMessageBlock
      Writes the data bytes portion of the SMB message to the wire format.
      Specified by:
      writeBytesWireFormat in class ServerMessageBlock
      Parameters:
      dst - the destination buffer
      dstIndex - the starting offset in the buffer
      Returns:
      the number of bytes written
    • readParameterWordsWireFormat

      protected int readParameterWordsWireFormat(byte[] buffer, int bufferIndex)
      Description copied from class: ServerMessageBlock
      Reads the parameter words portion of the SMB message from the wire format.
      Specified by:
      readParameterWordsWireFormat in class ServerMessageBlock
      Parameters:
      buffer - the buffer containing the message data
      bufferIndex - the starting offset in the buffer
      Returns:
      the number of bytes read
    • readBytesWireFormat

      protected int readBytesWireFormat(byte[] buffer, int bufferIndex)
      Description copied from class: ServerMessageBlock
      Reads the data bytes portion of the SMB message from the wire format.
      Specified by:
      readBytesWireFormat in class ServerMessageBlock
      Parameters:
      buffer - the buffer containing the message data
      bufferIndex - the starting offset in the buffer
      Returns:
      the number of bytes read
    • toString

      public String toString()
      Overrides:
      toString in class AndXServerMessageBlock