Module jcifs

Class Trans2QueryFSInformationResponse

All Implemented Interfaces:
Enumeration<SmbComTransactionResponse>, CommonServerMessageBlock, CommonServerMessageBlockRequest, CommonServerMessageBlockResponse, RequestWithPath, Message, Request, Response

public class Trans2QueryFSInformationResponse extends SmbComTransactionResponse
Trans2 QueryFSInformation response message for file system information queries. This class handles the response from a TRANS2_QUERY_FS_INFORMATION request, returning various file system information levels such as volume size and attributes.
  • Constructor Details

    • Trans2QueryFSInformationResponse

      public Trans2QueryFSInformationResponse(Configuration config, int informationLevel)
      Constructs a Trans2QueryFSInformationResponse with the specified configuration and information level.
      Parameters:
      config - the SMB configuration
      informationLevel - the file system information level being queried
  • Method Details

    • getInformationLevel

      public int getInformationLevel()
      Gets the information level that was queried.
      Returns:
      the informationLevel
    • getInfo

      public FileSystemInformation getInfo()
      Gets the file system information from the response.
      Returns:
      the filesystem info
    • getInfo

      public <T extends FileSystemInformation> T getInfo(Class<T> clazz) throws CIFSException
      Gets the file system information from the response cast to the specified type.
      Type Parameters:
      T - the type of file system information to return
      Parameters:
      clazz - the class of the file system information to return
      Returns:
      the filesystem info cast to the specified type
      Throws:
      CIFSException - if the information cannot be cast to the specified type
    • writeSetupWireFormat

      protected int writeSetupWireFormat(byte[] dst, int dstIndex)
      Description copied from class: SmbComTransactionResponse
      Writes setup data in wire format
      Specified by:
      writeSetupWireFormat in class SmbComTransactionResponse
      Parameters:
      dst - destination buffer
      dstIndex - starting index in destination buffer
      Returns:
      number of bytes written
    • writeParametersWireFormat

      protected int writeParametersWireFormat(byte[] dst, int dstIndex)
      Description copied from class: SmbComTransactionResponse
      Writes parameters in wire format
      Specified by:
      writeParametersWireFormat in class SmbComTransactionResponse
      Parameters:
      dst - destination buffer
      dstIndex - starting index in destination buffer
      Returns:
      number of bytes written
    • writeDataWireFormat

      protected int writeDataWireFormat(byte[] dst, int dstIndex)
      Description copied from class: SmbComTransactionResponse
      Writes data in wire format
      Specified by:
      writeDataWireFormat in class SmbComTransactionResponse
      Parameters:
      dst - destination buffer
      dstIndex - starting index in destination buffer
      Returns:
      number of bytes written
    • readSetupWireFormat

      protected int readSetupWireFormat(byte[] buffer, int bufferIndex, int len)
      Description copied from class: SmbComTransactionResponse
      Reads setup data from wire format
      Specified by:
      readSetupWireFormat in class SmbComTransactionResponse
      Parameters:
      buffer - source buffer
      bufferIndex - starting index in source buffer
      len - length of data to read
      Returns:
      number of bytes read
    • readParametersWireFormat

      protected int readParametersWireFormat(byte[] buffer, int bufferIndex, int len)
      Description copied from class: SmbComTransactionResponse
      Reads parameters from wire format
      Specified by:
      readParametersWireFormat in class SmbComTransactionResponse
      Parameters:
      buffer - source buffer
      bufferIndex - starting index in source buffer
      len - length of data to read
      Returns:
      number of bytes read
    • readDataWireFormat

      protected int readDataWireFormat(byte[] buffer, int bufferIndex, int len) throws SMBProtocolDecodingException
      Description copied from class: SmbComTransactionResponse
      Reads data from wire format
      Specified by:
      readDataWireFormat in class SmbComTransactionResponse
      Parameters:
      buffer - source buffer
      bufferIndex - starting index in source buffer
      len - length of data to read
      Returns:
      number of bytes read
      Throws:
      SMBProtocolDecodingException - if decoding fails
    • toString

      public String toString()
      Overrides:
      toString in class SmbComTransactionResponse