Module jcifs

Class SmbComQueryInformationResponse

java.lang.Object
org.codelibs.jcifs.smb.internal.smb1.ServerMessageBlock
org.codelibs.jcifs.smb.internal.smb1.com.SmbComQueryInformationResponse
All Implemented Interfaces:
CommonServerMessageBlock, CommonServerMessageBlockRequest, CommonServerMessageBlockResponse, RequestWithPath, SmbBasicFileInfo, Message, Request, Response

public class SmbComQueryInformationResponse extends ServerMessageBlock implements SmbBasicFileInfo
Response for SMB1 COM_QUERY_INFORMATION command. This response contains file attributes, size, and timestamps for the requested file or directory.
  • Constructor Details

    • SmbComQueryInformationResponse

      public SmbComQueryInformationResponse(Configuration config, long serverTimeZoneOffset)
      Constructs a query information response.
      Parameters:
      config - the configuration
      serverTimeZoneOffset - the server time zone offset
  • Method Details

    • getAttributes

      public int getAttributes()
      Description copied from interface: SmbBasicFileInfo
      Gets the file attributes.
      Specified by:
      getAttributes in interface SmbBasicFileInfo
      Returns:
      file attributes
    • getCreateTime

      public long getCreateTime()
      Description copied from interface: SmbBasicFileInfo
      Gets the file creation time.
      Specified by:
      getCreateTime in interface SmbBasicFileInfo
      Returns:
      file create time
    • getLastWriteTime

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

      public long getLastAccessTime()
      Description copied from interface: SmbBasicFileInfo
      Gets the file last access time.
      Specified by:
      getLastAccessTime in interface SmbBasicFileInfo
      Returns:
      file last access time
    • getSize

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