Module jcifs

Class SmbComNTCreateAndXResponse

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

public class SmbComNTCreateAndXResponse extends AndXServerMessageBlock implements SmbBasicFileInfo
SMB1 NT Create AndX Response message. This response contains information about the created or opened file, including file handle, attributes, and creation disposition.
  • Constructor Details

    • SmbComNTCreateAndXResponse

      public SmbComNTCreateAndXResponse(Configuration config)
      Constructs an NT Create AndX response.
      Parameters:
      config - the configuration
  • Method Details

    • getFileType

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

      public final boolean isExtended()
      Checks if the response is extended.
      Returns:
      the isExtended
    • setExtended

      public final void setExtended(boolean isExtended)
      Sets whether the response is extended.
      Parameters:
      isExtended - the isExtended to set
    • getOplockLevel

      public final byte getOplockLevel()
      Gets the oplock level granted.
      Returns:
      the oplockLevel
    • getFid

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

      public final int getCreateAction()
      Gets the create action taken.
      Returns:
      the createAction
    • getExtFileAttributes

      public final int getExtFileAttributes()
      Gets the extended file attributes.
      Returns:
      the extFileAttributes
    • getAttributes

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

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

      public final long getCreationTime()
      Gets the creation time.
      Returns:
      the creationTime
    • getCreateTime

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

      public final long getLastAccessTime()
      Description copied from interface: SmbBasicFileInfo
      Gets the file last access time.
      Specified by:
      getLastAccessTime in interface SmbBasicFileInfo
      Returns:
      the lastAccessTime
    • 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
    • getAllocationSize

      public final long getAllocationSize()
      Gets the allocation size.
      Returns:
      the allocationSize
    • getEndOfFile

      public final long getEndOfFile()
      Gets the end of file position.
      Returns:
      the endOfFile
    • getSize

      public long getSize()
      Gets the file size in bytes.
      Specified by:
      getSize in interface SmbBasicFileInfo
      Returns:
      file size
      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