Package jcifs.internal.smb2.create
Class Smb2CreateRequest
- java.lang.Object
-
- jcifs.internal.smb2.ServerMessageBlock2
-
- jcifs.internal.smb2.ServerMessageBlock2Request<Smb2CreateResponse>
-
- jcifs.internal.smb2.create.Smb2CreateRequest
-
- All Implemented Interfaces:
CommonServerMessageBlock
,CommonServerMessageBlockRequest
,Request<Smb2CreateResponse>
,RequestWithPath
,Message
,Request
public class Smb2CreateRequest extends ServerMessageBlock2Request<Smb2CreateResponse> implements RequestWithPath
- Author:
- mbechler
-
-
Field Summary
-
Fields inherited from class jcifs.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
Constructors Constructor Description Smb2CreateRequest(Configuration config, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Smb2CreateResponse
createResponse(CIFSContext tc, ServerMessageBlock2Request<Smb2CreateResponse> req)
String
getDomain()
String
getFullUNCPath()
String
getPath()
String
getServer()
boolean
isResolveInDfs()
protected int
readBytesWireFormat(byte[] buffer, int bufferIndex)
void
setCreateDisposition(int createDisposition)
void
setCreateOptions(int createOptions)
void
setDesiredAccess(int desiredAccess)
void
setFileAttributes(int fileAttributes)
void
setFullUNCPath(String domain, String server, String fullName)
void
setImpersonationLevel(int impersonationLevel)
void
setPath(String path)
Strips a leading \void
setRequestedOplockLevel(byte requestedOplockLevel)
void
setResolveInDfs(boolean resolve)
void
setSecurityFlags(byte securityFlags)
void
setShareAccess(int shareAccess)
void
setSmbCreateFlags(long smbCreateFlags)
int
size()
String
toString()
protected int
writeBytesWireFormat(byte[] dst, int dstIndex)
-
Methods inherited from class jcifs.internal.smb2.ServerMessageBlock2Request
allowChain, createCancel, encode, getCreditCost, getNext, getOverrideTimeout, getResponse, ignoreDisconnect, initResponse, isCancel, isResponseAsync, setNext, setOverrideTimeout, setRequestCredits, setResponse, setTid, split
-
Methods inherited from class jcifs.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, writeHeaderWireFormat
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jcifs.internal.CommonServerMessageBlock
decode, encode, getCommand, getDigest, getMid, reset, setCommand, setDigest, setExtendedSecurity, setMid, setResponse, setSessionId, setUid
-
Methods inherited from interface jcifs.util.transport.Message
getRawPayload, isRetainPayload, retainPayload, setRawPayload
-
-
-
-
Field Detail
-
SMB2_OPLOCK_LEVEL_NONE
public static final byte SMB2_OPLOCK_LEVEL_NONE
- See Also:
- Constant Field Values
-
SMB2_OPLOCK_LEVEL_II
public static final byte SMB2_OPLOCK_LEVEL_II
- See Also:
- Constant Field Values
-
SMB2_OPLOCK_LEVEL_EXCLUSIVE
public static final byte SMB2_OPLOCK_LEVEL_EXCLUSIVE
- See Also:
- Constant Field Values
-
SMB2_OPLOCK_LEVEL_BATCH
public static final byte SMB2_OPLOCK_LEVEL_BATCH
- See Also:
- Constant Field Values
-
SMB2_OPLOCK_LEVEL_LEASE
public static final byte SMB2_OPLOCK_LEVEL_LEASE
- See Also:
- Constant Field Values
-
SMB2_IMPERSONATION_LEVEL_ANONYMOUS
public static final int SMB2_IMPERSONATION_LEVEL_ANONYMOUS
- See Also:
- Constant Field Values
-
SMB2_IMPERSONATION_LEVEL_IDENTIFICATION
public static final int SMB2_IMPERSONATION_LEVEL_IDENTIFICATION
- See Also:
- Constant Field Values
-
SMB2_IMPERSONATION_LEVEL_IMPERSONATION
public static final int SMB2_IMPERSONATION_LEVEL_IMPERSONATION
- See Also:
- Constant Field Values
-
SMB2_IMPERSONATION_LEVEL_DELEGATE
public static final int SMB2_IMPERSONATION_LEVEL_DELEGATE
- See Also:
- Constant Field Values
-
FILE_SHARE_READ
public static final int FILE_SHARE_READ
- See Also:
- Constant Field Values
-
FILE_SHARE_WRITE
public static final int FILE_SHARE_WRITE
- See Also:
- Constant Field Values
-
FILE_SHARE_DELETE
public static final int FILE_SHARE_DELETE
- See Also:
- Constant Field Values
-
FILE_SUPERSEDE
public static final int FILE_SUPERSEDE
- See Also:
- Constant Field Values
-
FILE_OPEN
public static final int FILE_OPEN
- See Also:
- Constant Field Values
-
FILE_CREATE
public static final int FILE_CREATE
- See Also:
- Constant Field Values
-
FILE_OPEN_IF
public static final int FILE_OPEN_IF
- See Also:
- Constant Field Values
-
FILE_OVERWRITE
public static final int FILE_OVERWRITE
- See Also:
- Constant Field Values
-
FILE_OVERWRITE_IF
public static final int FILE_OVERWRITE_IF
- See Also:
- Constant Field Values
-
FILE_DIRECTORY_FILE
public static final int FILE_DIRECTORY_FILE
- See Also:
- Constant Field Values
-
FILE_WRITE_THROUGH
public static final int FILE_WRITE_THROUGH
- See Also:
- Constant Field Values
-
FILE_SEQUENTIAL_ONLY
public static final int FILE_SEQUENTIAL_ONLY
- See Also:
- Constant Field Values
-
FILE_NO_IMTERMEDIATE_BUFFERING
public static final int FILE_NO_IMTERMEDIATE_BUFFERING
- See Also:
- Constant Field Values
-
FILE_SYNCHRONOUS_IO_ALERT
public static final int FILE_SYNCHRONOUS_IO_ALERT
- See Also:
- Constant Field Values
-
FILE_SYNCHRONOUS_IO_NONALERT
public static final int FILE_SYNCHRONOUS_IO_NONALERT
- See Also:
- Constant Field Values
-
FILE_NON_DIRECTORY_FILE
public static final int FILE_NON_DIRECTORY_FILE
- See Also:
- Constant Field Values
-
FILE_COMPLETE_IF_OPLOCKED
public static final int FILE_COMPLETE_IF_OPLOCKED
- See Also:
- Constant Field Values
-
FILE_NO_EA_KNOWLEDGE
public static final int FILE_NO_EA_KNOWLEDGE
- See Also:
- Constant Field Values
-
FILE_OPEN_REMOTE_INSTANCE
public static final int FILE_OPEN_REMOTE_INSTANCE
- See Also:
- Constant Field Values
-
FILE_RANDOM_ACCESS
public static final int FILE_RANDOM_ACCESS
- See Also:
- Constant Field Values
-
FILE_DELETE_ON_CLOSE
public static final int FILE_DELETE_ON_CLOSE
- See Also:
- Constant Field Values
-
FILE_OPEN_BY_FILE_ID
public static final int FILE_OPEN_BY_FILE_ID
- See Also:
- Constant Field Values
-
FILE_OPEN_FOR_BACKUP_INTENT
public static final int FILE_OPEN_FOR_BACKUP_INTENT
- See Also:
- Constant Field Values
-
FILE_NO_COMPRESSION
public static final int FILE_NO_COMPRESSION
- See Also:
- Constant Field Values
-
FILE_OPEN_REQUIRING_OPLOCK
public static final int FILE_OPEN_REQUIRING_OPLOCK
- See Also:
- Constant Field Values
-
FILE_DISALLOW_EXCLUSIVE
public static final int FILE_DISALLOW_EXCLUSIVE
- See Also:
- Constant Field Values
-
FILE_RESERVE_OPFILTER
public static final int FILE_RESERVE_OPFILTER
- See Also:
- Constant Field Values
-
FILE_OPEN_REPARSE_POINT
public static final int FILE_OPEN_REPARSE_POINT
- See Also:
- Constant Field Values
-
FILE_NOP_RECALL
public static final int FILE_NOP_RECALL
- See Also:
- Constant Field Values
-
FILE_OPEN_FOR_FREE_SPACE_QUERY
public static final int FILE_OPEN_FOR_FREE_SPACE_QUERY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Smb2CreateRequest
public Smb2CreateRequest(Configuration config, String name)
- Parameters:
config
-name
- uncPath to open, strips a leading \
-
-
Method Detail
-
createResponse
protected Smb2CreateResponse createResponse(CIFSContext tc, ServerMessageBlock2Request<Smb2CreateResponse> req)
- Specified by:
createResponse
in classServerMessageBlock2Request<Smb2CreateResponse>
- Returns:
-
getPath
public String getPath()
- Specified by:
getPath
in interfaceRequestWithPath
- Returns:
- the path to the resource (below share)
- See Also:
RequestWithPath.getPath()
-
getFullUNCPath
public String getFullUNCPath()
- Specified by:
getFullUNCPath
in interfaceRequestWithPath
- Returns:
- the full UNC path
- See Also:
RequestWithPath.getFullUNCPath()
-
getServer
public String getServer()
- Specified by:
getServer
in interfaceRequestWithPath
- Returns:
- the server name
- See Also:
RequestWithPath.getServer()
-
getDomain
public String getDomain()
- Specified by:
getDomain
in interfaceRequestWithPath
- Returns:
- the domain name
- See Also:
RequestWithPath.getDomain()
-
setFullUNCPath
public void setFullUNCPath(String domain, String server, String fullName)
- Specified by:
setFullUNCPath
in interfaceRequestWithPath
- Parameters:
fullName
- the fullName to set
-
setPath
public void setPath(String path)
Strips a leading \- Specified by:
setPath
in interfaceRequestWithPath
- See Also:
RequestWithPath.setPath(java.lang.String)
-
setResolveInDfs
public void setResolveInDfs(boolean resolve)
- Specified by:
setResolveInDfs
in interfaceRequestWithPath
- See Also:
RequestWithPath.setResolveInDfs(boolean)
-
isResolveInDfs
public boolean isResolveInDfs()
- Specified by:
isResolveInDfs
in interfaceRequestWithPath
- Returns:
- whether to resolve the request path in DFS
- See Also:
RequestWithPath.isResolveInDfs()
-
setSecurityFlags
public void setSecurityFlags(byte securityFlags)
- Parameters:
securityFlags
- the securityFlags to set
-
setRequestedOplockLevel
public void setRequestedOplockLevel(byte requestedOplockLevel)
- Parameters:
requestedOplockLevel
- the requestedOplockLevel to set
-
setImpersonationLevel
public void setImpersonationLevel(int impersonationLevel)
- Parameters:
impersonationLevel
- the impersonationLevel to set
-
setSmbCreateFlags
public void setSmbCreateFlags(long smbCreateFlags)
- Parameters:
smbCreateFlags
- the smbCreateFlags to set
-
setDesiredAccess
public void setDesiredAccess(int desiredAccess)
- Parameters:
desiredAccess
- the desiredAccess to set
-
setFileAttributes
public void setFileAttributes(int fileAttributes)
- Parameters:
fileAttributes
- the fileAttributes to set
-
setShareAccess
public void setShareAccess(int shareAccess)
- Parameters:
shareAccess
- the shareAccess to set
-
setCreateDisposition
public void setCreateDisposition(int createDisposition)
- Parameters:
createDisposition
- the createDisposition to set
-
setCreateOptions
public void setCreateOptions(int createOptions)
- Parameters:
createOptions
- the createOptions to set
-
size
public int size()
- Specified by:
size
in interfaceCommonServerMessageBlockRequest
- Returns:
- the size of this message
- See Also:
CommonServerMessageBlockRequest.size()
-
writeBytesWireFormat
protected int writeBytesWireFormat(byte[] dst, int dstIndex)
- Specified by:
writeBytesWireFormat
in classServerMessageBlock2
- See Also:
ServerMessageBlock2.writeBytesWireFormat(byte[], int)
-
readBytesWireFormat
protected int readBytesWireFormat(byte[] buffer, int bufferIndex)
- Specified by:
readBytesWireFormat
in classServerMessageBlock2
- See Also:
ServerMessageBlock2.readBytesWireFormat(byte[], int)
-
toString
public String toString()
- Overrides:
toString
in classServerMessageBlock2
-
-