Module jcifs

Class Trans2FindFirst2Response

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

public class Trans2FindFirst2Response extends SmbComTransactionResponse
Trans2 FindFirst2 response message for SMB1 directory enumeration. This class handles the response from a TRANS2_FIND_FIRST2 request, which returns the first set of directory entries matching the specified search criteria.
  • Constructor Details

    • Trans2FindFirst2Response

      public Trans2FindFirst2Response(Configuration config)
      Constructs a Trans2FindFirst2Response.
      Parameters:
      config - the configuration to use
  • Method Details

    • getSid

      public final int getSid()
      Gets the search ID for this response.
      Returns:
      the sid
    • isEndOfSearch

      public final boolean isEndOfSearch()
      Checks if this is the end of the search results.
      Returns:
      the isEndOfSearch
    • getLastName

      public final String getLastName()
      Gets the last file name in the response.
      Returns:
      the lastName
    • getResumeKey

      public final int getResumeKey()
      Gets the resume key for continuing the search.
      Returns:
      the resumeKey
    • 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