java.lang.Object
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2Response
org.codelibs.jcifs.smb.internal.smb2.create.Smb2CreateResponse
- All Implemented Interfaces:
CommonServerMessageBlock,CommonServerMessageBlockResponse,SmbBasicFileInfo,Message,Response
SMB2 Create response message. This response contains the file ID and attributes
of the created or opened file or directory.
- 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
ConstructorsConstructorDescriptionSmb2CreateResponse(Configuration config, String name) Constructs an SMB2 create response -
Method Summary
Modifier and TypeMethodDescriptionfinal longGet the allocation size of the filefinal intGets the file attributes.final longGet the file change timefinal intGet the create action taken by the serverGet the create context responsesfinal longGets the file creation time.final longGet the file creation timefinal longGet the end of file positionfinal intGet the file attributesfinal byte[]Get the unique file identifierfinal StringGet the file namefinal longGets the file last access time.final longGets the file last write time.final byteGet the open flags returned by the serverfinal byteGet the oplock level granted by the serverfinal longgetSize()Gets the file size in bytes.voidPrepares this response for the next request.protected intreadBytesWireFormat(byte[] buffer, int bufferIndex) Reads the message body from the wire format.protected intwriteBytesWireFormat(byte[] dst, int dstIndex) Writes the message body to the wire format.Methods inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2Response
clearReceived, error, exception, getErrorCode, getException, getExpiration, getGrantedCredits, getNextResponse, haveResponse, isAsyncHandled, isError, isReceived, isSigned, isVerifyFailed, received, reset, setAsyncHandled, setExpiration, verifySignatureMethods inherited from class org.codelibs.jcifs.smb.internal.smb2.ServerMessageBlock2
addFlags, chain, clearFlags, decode, decode, encode, equals, getAsyncId, getCommand, getConfig, getCredit, getCreditCharge, getDigest, getErrorContextCount, getErrorData, getFlags, getHeaderStart, getLength, getMid, getNext, getNextCommandOffset, getRawPayload, getResponse, getSessionId, getStatus, getTreeId, hashCode, isAsync, isErrorResponseStatus, isRetainPayload, pad8, readErrorResponse, readHeaderWireFormat, retainPayload, setAsyncId, setCommand, setCredit, setDigest, setExtendedSecurity, setMid, setNext, setRawPayload, setReadSize, setResponse, 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, encode, getCommand, getDigest, getMid, getResponse, setCommand, setDigest, setExtendedSecurity, setMid, setResponse, setSessionId, setUidMethods inherited from interface org.codelibs.jcifs.smb.internal.CommonServerMessageBlockResponse
isAsyncMethods inherited from interface org.codelibs.jcifs.smb.util.transport.Message
getRawPayload, isRetainPayload, retainPayload, setRawPayload
-
Constructor Details
-
Smb2CreateResponse
Constructs an SMB2 create response- Parameters:
config- the client configurationname- the file name
-
-
Method Details
-
prepare
Prepares this response for the next request.- Specified by:
preparein interfaceCommonServerMessageBlockResponse- Overrides:
preparein classServerMessageBlock2Response- Parameters:
next- the next request to prepare for- See Also:
-
getOplockLevel
public final byte getOplockLevel()Get the oplock level granted by the server- Returns:
- the oplockLevel
-
getOpenFlags
public final byte getOpenFlags()Get the open flags returned by the server- Returns:
- the flags
-
getCreateAction
public final int getCreateAction()Get the create action taken by the server- Returns:
- the createAction
-
getCreationTime
public final long getCreationTime()Get the file creation time- Returns:
- the creationTime
-
getCreateTime
public final long getCreateTime()Gets the file creation time.- Specified by:
getCreateTimein interfaceSmbBasicFileInfo- Returns:
- file create time
- See Also:
-
getLastAccessTime
public final long getLastAccessTime()Description copied from interface:SmbBasicFileInfoGets the file last access time.- Specified by:
getLastAccessTimein interfaceSmbBasicFileInfo- Returns:
- the lastAccessTime
-
getLastWriteTime
public final long getLastWriteTime()Description copied from interface:SmbBasicFileInfoGets the file last write time.- Specified by:
getLastWriteTimein interfaceSmbBasicFileInfo- Returns:
- the lastWriteTime
-
getChangeTime
public final long getChangeTime()Get the file change time- Returns:
- the changeTime
-
getAllocationSize
public final long getAllocationSize()Get the allocation size of the file- Returns:
- the allocationSize
-
getEndOfFile
public final long getEndOfFile()Get the end of file position- Returns:
- the endOfFile
-
getSize
public final long getSize()Gets the file size in bytes.- Specified by:
getSizein interfaceSmbBasicFileInfo- Returns:
- file size
- See Also:
-
getFileAttributes
public final int getFileAttributes()Get the file attributes- Returns:
- the fileAttributes
-
getAttributes
public final int getAttributes()Gets the file attributes.- Specified by:
getAttributesin interfaceSmbBasicFileInfo- Returns:
- file attributes
- See Also:
-
getFileId
public final byte[] getFileId()Get the unique file identifier- Returns:
- the fileId
-
getFileName
Get the file name- Returns:
- the fileName
-
getCreateContexts
Get the create context responses- Returns:
- the createContexts
-
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) throws SMBProtocolDecodingException 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
- Throws:
SMBProtocolDecodingException- if there is an error decoding the response- See Also:
-