1 18 19 package jcifs.smb; 20 21 import jcifs.Config; 22 import jcifs.util.Hexdump; 23 24 class Trans2FindNext2 extends SmbComTransaction { 25 26 private int sid, informationLevel, resumeKey, flags; 27 private String filename; 28 29 Trans2FindNext2( int sid, int resumeKey, String filename ) { 30 this.sid = sid; 31 this.resumeKey = resumeKey; 32 this.filename = filename; 33 command = SMB_COM_TRANSACTION2; 34 subCommand = TRANS2_FIND_NEXT2; 35 informationLevel = Trans2FindFirst2.SMB_FILE_BOTH_DIRECTORY_INFO; 36 flags = 0x00; 37 maxParameterCount = 8; 38 maxDataCount = Trans2FindFirst2.LIST_SIZE; 39 maxSetupCount = 0; 40 } 41 42 void reset( int resumeKey, String lastName ) { 43 super.reset(); 44 this.resumeKey = resumeKey; 45 this.filename = lastName; 46 flags2 = 0; 47 } 48 49 int writeSetupWireFormat( byte[] dst, int dstIndex ) { 50 dst[dstIndex++] = subCommand; 51 dst[dstIndex++] = (byte)0x00; 52 return 2; 53 } 54 int writeParametersWireFormat( byte[] dst, int dstIndex ) { 55 int start = dstIndex; 56 57 writeInt2( sid, dst, dstIndex ); 58 dstIndex += 2; 59 writeInt2( Trans2FindFirst2.LIST_COUNT, dst, dstIndex ); 60 dstIndex += 2; 61 writeInt2( informationLevel, dst, dstIndex ); 62 dstIndex += 2; 63 writeInt4( resumeKey, dst, dstIndex ); 64 dstIndex += 4; 65 writeInt2( flags, dst, dstIndex ); 66 dstIndex += 2; 67 dstIndex += writeString( filename, dst, dstIndex ); 68 69 return dstIndex - start; 70 } 71 int writeDataWireFormat( byte[] dst, int dstIndex ) { 72 return 0; 73 } 74 int readSetupWireFormat( byte[] buffer, int bufferIndex, int len ) { 75 return 0; 76 } 77 int readParametersWireFormat( byte[] buffer, int bufferIndex, int len ) { 78 return 0; 79 } 80 int readDataWireFormat( byte[] buffer, int bufferIndex, int len ) { 81 return 0; 82 } 83 public String toString() { 84 return new String ( "Trans2FindNext2[" + super.toString() + 85 ",sid=" + sid + 86 ",searchCount=" + Trans2FindFirst2.LIST_SIZE + 87 ",informationLevel=0x" + Hexdump.toHexString( informationLevel, 3 ) + 88 ",resumeKey=0x" + Hexdump.toHexString( resumeKey, 4 ) + 89 ",flags=0x" + Hexdump.toHexString( flags, 2 ) + 90 ",filename=" + filename + "]" ); 91 } 92 } 93 | Popular Tags |