Module jcifs

Class SmbComReadAndXResponse

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

public class SmbComReadAndXResponse extends AndXServerMessageBlock
SMB1 Read AndX Response message. This response contains the data that was read from the file along with information about the read operation.
  • Constructor Details

    • SmbComReadAndXResponse

      public SmbComReadAndXResponse(Configuration config)
      Constructs a Read AndX response.
      Parameters:
      config - the configuration
    • SmbComReadAndXResponse

      public SmbComReadAndXResponse(Configuration config, byte[] b, int off)
      Constructs a Read AndX response with buffer.
      Parameters:
      config - the configuration
      b - the data buffer
      off - the offset in the buffer
  • Method Details

    • getData

      public final byte[] getData()
      Gets the read data buffer.
      Returns:
      the read data
    • getOffset

      public final int getOffset()
      Gets the offset in the data buffer.
      Returns:
      the offset
    • adjustOffset

      public void adjustOffset(int n)
      Adjusts the offset by the specified amount.
      Parameters:
      n - the amount to adjust the offset
    • getDataLength

      public final int getDataLength()
      Gets the data length.
      Returns:
      the dataLength
    • getDataOffset

      public final int getDataOffset()
      Gets the data offset.
      Returns:
      the dataOffset
    • 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