SmbComTransactionResponsepublic abstract class SmbComTransactionResponse extends ServerMessageBlock implements Enumeration
Fields Summary |
---|
private static final int | SETUP_OFFSET | private static final int | DISCONNECT_TID | private static final int | ONE_WAY_TRANSACTION | private int | pad | private int | pad1 | private boolean | parametersDone | private boolean | dataDone | protected int | totalParameterCount | protected int | totalDataCount | protected int | parameterCount | protected int | parameterOffset | protected int | parameterDisplacement | protected int | dataOffset | protected int | dataDisplacement | protected int | setupCount | protected int | bufParameterStart | protected int | bufDataStart | int | dataCount | byte | subCommand | boolean | hasMore | boolean | isPrimary | byte[] | txn_buf | int | status | int | numEntries | FileEntry[] | results |
Constructors Summary |
---|
SmbComTransactionResponse()
txn_buf = null;
|
Methods Summary |
---|
public boolean | hasMoreElements()
return errorCode == 0 && hasMore;
| public java.lang.Object | nextElement()
if( isPrimary ) {
isPrimary = false;
}
return this;
| int | readBytesWireFormat(byte[] buffer, int bufferIndex)
pad = pad1 = 0;
int n;
if( parameterCount > 0 ) {
bufferIndex += pad = parameterOffset - ( bufferIndex - headerStart );
System.arraycopy( buffer, bufferIndex, txn_buf,
bufParameterStart + parameterDisplacement, parameterCount );
bufferIndex += parameterCount;
}
if( dataCount > 0 ) {
bufferIndex += pad1 = dataOffset - ( bufferIndex - headerStart );
System.arraycopy( buffer, bufferIndex, txn_buf,
bufDataStart + dataDisplacement, dataCount );
bufferIndex += dataCount;
}
/* Check to see if the entire transaction has been
* read. If so call the read methods.
*/
if( !parametersDone &&
( parameterDisplacement + parameterCount ) == totalParameterCount) {
parametersDone = true;
}
if( !dataDone && ( dataDisplacement + dataCount ) == totalDataCount) {
dataDone = true;
}
if( parametersDone && dataDone ) {
hasMore = false;
readParametersWireFormat( txn_buf, bufParameterStart, totalParameterCount );
readDataWireFormat( txn_buf, bufDataStart, totalDataCount );
}
return pad + parameterCount + pad1 + dataCount;
| abstract int | readDataWireFormat(byte[] buffer, int bufferIndex, int len)
| int | readParameterWordsWireFormat(byte[] buffer, int bufferIndex)
int start = bufferIndex;
totalParameterCount = readInt2( buffer, bufferIndex );
if( bufDataStart == 0 ) {
bufDataStart = totalParameterCount;
}
bufferIndex += 2;
totalDataCount = readInt2( buffer, bufferIndex );
bufferIndex += 4; // Reserved
parameterCount = readInt2( buffer, bufferIndex );
bufferIndex += 2;
parameterOffset = readInt2( buffer, bufferIndex );
bufferIndex += 2;
parameterDisplacement = readInt2( buffer, bufferIndex );
bufferIndex += 2;
dataCount = readInt2( buffer, bufferIndex );
bufferIndex += 2;
dataOffset = readInt2( buffer, bufferIndex );
bufferIndex += 2;
dataDisplacement = readInt2( buffer, bufferIndex );
bufferIndex += 2;
setupCount = buffer[bufferIndex] & 0xFF;
bufferIndex += 2;
if( setupCount != 0 ) {
if( log.level > 2 )
log.println( "setupCount is not zero: " + setupCount );
}
return bufferIndex - start;
| abstract int | readParametersWireFormat(byte[] buffer, int bufferIndex, int len)
| abstract int | readSetupWireFormat(byte[] buffer, int bufferIndex, int len)
| void | reset()
super.reset();
bufDataStart = 0;
isPrimary = hasMore = true;
parametersDone = dataDone = false;
| public java.lang.String | toString()
return new String( super.toString() +
",totalParameterCount=" + totalParameterCount +
",totalDataCount=" + totalDataCount +
",parameterCount=" + parameterCount +
",parameterOffset=" + parameterOffset +
",parameterDisplacement=" + parameterDisplacement +
",dataCount=" + dataCount +
",dataOffset=" + dataOffset +
",dataDisplacement=" + dataDisplacement +
",setupCount=" + setupCount +
",pad=" + pad +
",pad1=" + pad1 );
| int | writeBytesWireFormat(byte[] dst, int dstIndex)
return 0;
| abstract int | writeDataWireFormat(byte[] dst, int dstIndex)
| int | writeParameterWordsWireFormat(byte[] dst, int dstIndex)
return 0;
| abstract int | writeParametersWireFormat(byte[] dst, int dstIndex)
| abstract int | writeSetupWireFormat(byte[] dst, int dstIndex)
|
|