java.lang.Object
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2Request<Smb2SetInfoResponse>
org.codelibs.jcifs.smb.internal.smb2.info.Smb2SetInfoRequest
- All Implemented Interfaces:
CommonServerMessageBlock,CommonServerMessageBlockRequest,Request<Smb2SetInfoResponse>,RequestWithFileId,Message,Request
public class Smb2SetInfoRequest
extends ServerMessageBlock2Request<Smb2SetInfoResponse>
implements RequestWithFileId
SMB2 Set Info request message. This command is used to modify file attributes,
security information, or other metadata on the server.
- Author:
- mbechler
-
Field Summary
Fields inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
SMB2_CANCEL, SMB2_CHANGE_NOTIFY, SMB2_CLOSE, SMB2_CREATE, SMB2_ECHO, SMB2_FLAGS_ASYNC_COMMAND, SMB2_FLAGS_DFS_OPERATIONS, SMB2_FLAGS_PRIORITY_MASK, SMB2_FLAGS_RELATED_OPERATIONS, SMB2_FLAGS_REPLAY_OPERATION, SMB2_FLAGS_SERVER_TO_REDIR, SMB2_FLAGS_SIGNED, SMB2_FLUSH, SMB2_IOCTL, SMB2_LOCK, SMB2_LOGOFF, SMB2_NEGOTIATE, SMB2_OPLOCK_BREAK, SMB2_QUERY_DIRECTORY, SMB2_QUERY_INFO, SMB2_READ, SMB2_SESSION_SETUP, SMB2_SET_INFO, SMB2_TREE_CONNECT, SMB2_TREE_DISCONNECT, SMB2_WRITE -
Constructor Summary
ConstructorsConstructorDescriptionSmb2SetInfoRequest(Configuration config) Constructs a SMB2 set info request with the specified configurationSmb2SetInfoRequest(Configuration config, byte[] fileId) Constructs a SMB2 set info request with the specified configuration and file ID -
Method Summary
Modifier and TypeMethodDescriptionprotected Smb2SetInfoResponseCreate the response object for this requestprotected intreadBytesWireFormat(byte[] buffer, int bufferIndex) Reads the message body from the wire format.voidsetAdditionalInformation(int additionalInformation) Sets additional information flags for the set info operationvoidsetFileId(byte[] fileId) Sets the file ID for this request.voidsetFileInfoClass(byte fileInfoClass) Sets the file information class for the set info operation<T extends FileInformation & Encodable>
voidsetFileInformation(T fi) Sets the file information to be set on the target filevoidSets the encodable information object for this requestvoidsetInfoType(byte infoType) Sets the information type for the set info operationintsize()Gets the size of this message.protected intwriteBytesWireFormat(byte[] dst, int dstIndex) Writes the message body to the wire format.Methods inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2Request
allowChain, createCancel, encode, getCreditCost, getNext, getOverrideTimeout, getResponse, ignoreDisconnect, initResponse, isCancel, isResponseAsync, setNext, setOverrideTimeout, setRequestCredits, setResponse, setTid, splitMethods inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
addFlags, chain, clearFlags, decode, decode, equals, getAsyncId, getCommand, getConfig, getCredit, getCreditCharge, getDigest, getErrorContextCount, getErrorData, getFlags, getHeaderStart, getLength, getMid, getNextCommandOffset, getRawPayload, getSessionId, getStatus, getTreeId, hashCode, haveResponse, isAsync, isErrorResponseStatus, isRetainPayload, pad8, readErrorResponse, readHeaderWireFormat, reset, retainPayload, setAsyncId, setCommand, setCredit, setDigest, setExtendedSecurity, setMid, setNext, setRawPayload, setReadSize, setSessionId, setTreeId, setUid, size8, size8, toString, writeHeaderWireFormatMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codelibs.jcifs.smb.internal.CommonServerMessageBlock
decode, getCommand, getDigest, getMid, reset, setCommand, setDigest, setExtendedSecurity, setMid, setSessionId, setUidMethods inherited from interface org.codelibs.jcifs.smb.util.transport.Message
getRawPayload, isRetainPayload, retainPayload, setRawPayload
-
Constructor Details
-
Smb2SetInfoRequest
Constructs a SMB2 set info request with the specified configuration- Parameters:
config- the configuration to use for this request
-
Smb2SetInfoRequest
Constructs a SMB2 set info request with the specified configuration and file ID- Parameters:
config- the configuration to use for this requestfileId- the file ID to set information for
-
-
Method Details
-
setFileId
public void setFileId(byte[] fileId) Sets the file ID for this request.- Specified by:
setFileIdin interfaceRequestWithFileId- Parameters:
fileId- the file ID to set- See Also:
-
setInfoType
public void setInfoType(byte infoType) Sets the information type for the set info operation- Parameters:
infoType- the infoType to set
-
setFileInfoClass
public void setFileInfoClass(byte fileInfoClass) Sets the file information class for the set info operation- Parameters:
fileInfoClass- the fileInfoClass to set
-
setAdditionalInformation
public void setAdditionalInformation(int additionalInformation) Sets additional information flags for the set info operation- Parameters:
additionalInformation- the additionalInformation to set
-
setFileInformation
Sets the file information to be set on the target file- Type Parameters:
T- the type of file information- Parameters:
fi- the file information to set
-
setInfo
Sets the encodable information object for this request- Parameters:
info- the info to set
-
createResponse
protected Smb2SetInfoResponse createResponse(CIFSContext tc, ServerMessageBlock2Request<Smb2SetInfoResponse> req) Create the response object for this request- Specified by:
createResponsein classServerMessageBlock2Request<Smb2SetInfoResponse>- Parameters:
tc- the CIFS contextreq- the request object- Returns:
- the response object
- See Also:
-
size
public int size()Gets the size of this message.- Specified by:
sizein interfaceCommonServerMessageBlockRequest- Returns:
- the size of this message
- See Also:
-
writeBytesWireFormat
protected int writeBytesWireFormat(byte[] dst, int dstIndex) Writes the message body to the wire format.- Specified by:
writeBytesWireFormatin classServerMessageBlock2- Parameters:
dst- the destination bufferdstIndex- the starting position in the buffer- Returns:
- number of bytes written
- See Also:
-
readBytesWireFormat
protected int readBytesWireFormat(byte[] buffer, int bufferIndex) Reads the message body from the wire format.- Specified by:
readBytesWireFormatin classServerMessageBlock2- Parameters:
buffer- the buffer to read frombufferIndex- the starting position in the buffer- Returns:
- number of bytes read
- See Also:
-