java.lang.Object
org.codelibs.jcifs.smb.internal.smb1.ServerMessageBlock
org.codelibs.jcifs.smb.internal.smb1.AndXServerMessageBlock
org.codelibs.jcifs.smb.internal.smb1.com.SmbComReadAndX
- All Implemented Interfaces:
CommonServerMessageBlock,CommonServerMessageBlockRequest,CommonServerMessageBlockResponse,RequestWithPath,Message,Request,Response
SMB1 Read AndX request message.
This command is used to read data from a file that has been
previously opened with an Open command.
-
Field Summary
Fields inherited from class org.codelibs.jcifs.smb.internal.smb1.ServerMessageBlock
batchLevel, byteCount, digest, errorCode, flags2, headerStart, length, mid, path, pid, SMB_COM_CHECK_DIRECTORY, SMB_COM_CLOSE, SMB_COM_CREATE_DIRECTORY, SMB_COM_DELETE, SMB_COM_DELETE_DIRECTORY, SMB_COM_ECHO, SMB_COM_FIND_CLOSE2, SMB_COM_LOCKING_ANDX, SMB_COM_LOGOFF_ANDX, SMB_COM_MOVE, SMB_COM_NEGOTIATE, SMB_COM_NT_CANCEL, SMB_COM_NT_CREATE_ANDX, SMB_COM_NT_TRANSACT, SMB_COM_NT_TRANSACT_SECONDARY, SMB_COM_OPEN_ANDX, SMB_COM_QUERY_INFORMATION, SMB_COM_READ_ANDX, SMB_COM_RENAME, SMB_COM_SEEK, SMB_COM_SESSION_SETUP_ANDX, SMB_COM_SET_INFORMATION, SMB_COM_TRANSACTION, SMB_COM_TRANSACTION_SECONDARY, SMB_COM_TRANSACTION2, SMB_COM_TREE_CONNECT_ANDX, SMB_COM_TREE_DISCONNECT, SMB_COM_WRITE, SMB_COM_WRITE_ANDX, tid, uid, wordCount -
Constructor Summary
ConstructorsConstructorDescriptionSmbComReadAndX(Configuration config) Constructs a Read AndX request.SmbComReadAndX(Configuration config, int fid, long offset, int maxCount, ServerMessageBlock andx) Constructs a Read AndX request with parameters. -
Method Summary
Modifier and TypeMethodDescriptionprotected intgetBatchLimit(Configuration cfg, byte cmd) Gets the batch limit for chained commandsfinal intGets the maximum count of bytes to read.final intGets the minimum count of bytes to read.final intGets the remaining bytes count.protected intreadBytesWireFormat(byte[] buffer, int bufferIndex) Reads the data bytes portion of the SMB message from the wire format.protected intreadParameterWordsWireFormat(byte[] buffer, int bufferIndex) Reads the parameter words portion of the SMB message from the wire format.final voidsetMaxCount(int maxCount) Sets the maximum count of bytes to read.final voidsetMinCount(int minCount) Sets the minimum count of bytes to read.final voidsetOpenTimeout(int openTimeout) Sets the open timeout value.final voidsetRemaining(int remaining) Sets the remaining bytes count.toString()protected intwriteBytesWireFormat(byte[] dst, int dstIndex) Writes the data bytes portion of the SMB message to the wire format.protected intwriteParameterWordsWireFormat(byte[] dst, int dstIndex) Writes the parameter words portion of the SMB message to the wire format.Methods inherited from class org.codelibs.jcifs.smb.internal.smb1.AndXServerMessageBlock
decode, encode, getAndx, getNext, getNextResponse, readAndXWireFormat, writeAndXWireFormatMethods inherited from class org.codelibs.jcifs.smb.internal.smb1.ServerMessageBlock
addFlags2, allowChain, clearReceived, createCancel, equals, error, exception, getByteCount, getCommand, getConfig, getCreditCost, getDigest, getDomain, getErrorCode, getException, getExpiration, getFlags, getFlags2, getFullUNCPath, getGrantedCredits, getLength, getMid, getOverrideTimeout, getPath, getPid, getRawPayload, getResponse, getServer, getSignSeq, getTid, getUid, hashCode, ignoreDisconnect, isAsync, isCancel, isError, isExtendedSecurity, isForceUnicode, isReceived, isResolveInDfs, isResponse, isResponseAsync, isRetainPayload, isUseUnicode, isVerifyFailed, prepare, readHeaderWireFormat, readString, readString, readString, readStringLength, received, remFlags2, reset, retainPayload, setCommand, setDigest, setErrorCode, setExpiration, setExtendedSecurity, setFlags, setFlags2, setFullUNCPath, setMid, setOverrideTimeout, setPath, setPid, setRawPayload, setRequestCredits, setResolveInDfs, setResponse, setSessionId, setSignSeq, setTid, setUid, setUseUnicode, size, split, stringWireLength, verifySignature, writeHeaderWireFormat, writeString, writeString
-
Constructor Details
-
SmbComReadAndX
Constructs a Read AndX request.- Parameters:
config- the configuration
-
SmbComReadAndX
public SmbComReadAndX(Configuration config, int fid, long offset, int maxCount, ServerMessageBlock andx) Constructs a Read AndX request with parameters.- Parameters:
config- the configurationfid- the file identifieroffset- the file offset to read frommaxCount- the maximum number of bytes to readandx- the next command in the chain
-
-
Method Details
-
getMaxCount
public final int getMaxCount()Gets the maximum count of bytes to read.- Returns:
- the maxCount
-
setMaxCount
public final void setMaxCount(int maxCount) Sets the maximum count of bytes to read.- Parameters:
maxCount- the maxCount to set
-
getMinCount
public final int getMinCount()Gets the minimum count of bytes to read.- Returns:
- the minCount
-
setMinCount
public final void setMinCount(int minCount) Sets the minimum count of bytes to read.- Parameters:
minCount- the minCount to set
-
getRemaining
public final int getRemaining()Gets the remaining bytes count.- Returns:
- the remaining
-
setOpenTimeout
public final void setOpenTimeout(int openTimeout) Sets the open timeout value.- Parameters:
openTimeout- the openTimeout to set
-
setRemaining
public final void setRemaining(int remaining) Sets the remaining bytes count.- Parameters:
remaining- the remaining to set
-
getBatchLimit
Description copied from class:AndXServerMessageBlockGets the batch limit for chained commands- Overrides:
getBatchLimitin classAndXServerMessageBlock- Parameters:
cfg- the configurationcmd- the command byte- Returns:
- the batch limit
-
writeParameterWordsWireFormat
protected int writeParameterWordsWireFormat(byte[] dst, int dstIndex) Description copied from class:ServerMessageBlockWrites the parameter words portion of the SMB message to the wire format.- Specified by:
writeParameterWordsWireFormatin classServerMessageBlock- Parameters:
dst- the destination bufferdstIndex- the starting offset in the buffer- Returns:
- the number of bytes written
-
writeBytesWireFormat
protected int writeBytesWireFormat(byte[] dst, int dstIndex) Description copied from class:ServerMessageBlockWrites the data bytes portion of the SMB message to the wire format.- Specified by:
writeBytesWireFormatin classServerMessageBlock- Parameters:
dst- the destination bufferdstIndex- the starting offset in the buffer- Returns:
- the number of bytes written
-
readParameterWordsWireFormat
protected int readParameterWordsWireFormat(byte[] buffer, int bufferIndex) Description copied from class:ServerMessageBlockReads the parameter words portion of the SMB message from the wire format.- Specified by:
readParameterWordsWireFormatin classServerMessageBlock- Parameters:
buffer- the buffer containing the message databufferIndex- the starting offset in the buffer- Returns:
- the number of bytes read
-
readBytesWireFormat
protected int readBytesWireFormat(byte[] buffer, int bufferIndex) Description copied from class:ServerMessageBlockReads the data bytes portion of the SMB message from the wire format.- Specified by:
readBytesWireFormatin classServerMessageBlock- Parameters:
buffer- the buffer containing the message databufferIndex- the starting offset in the buffer- Returns:
- the number of bytes read
-
toString
- Overrides:
toStringin classAndXServerMessageBlock
-