1 18 19 package jcifs.smb; 20 21 import java.util.Date ; 22 import jcifs.util.Hexdump; 23 24 class SmbComNTCreateAndXResponse extends AndXServerMessageBlock { 25 26 static final int EXCLUSIVE_OPLOCK_GRANTED = 1; 27 static final int BATCH_OPLOCK_GRANTED = 2; 28 static final int LEVEL_II_OPLOCK_GRANTED = 3; 29 30 byte oplockLevel; 31 int fid, 32 createAction, 33 extFileAttributes, 34 fileType, 35 deviceState; 36 long creationTime, 37 lastAccessTime, 38 lastWriteTime, 39 changeTime, 40 allocationSize, 41 endOfFile; 42 boolean directory; 43 boolean isExtended; 44 45 SmbComNTCreateAndXResponse() { 46 } 47 48 int writeParameterWordsWireFormat( byte[] dst, int dstIndex ) { 49 return 0; 50 } 51 int writeBytesWireFormat( byte[] dst, int dstIndex ) { 52 return 0; 53 } 54 int readParameterWordsWireFormat( byte[] buffer, int bufferIndex ) { 55 int start = bufferIndex; 56 57 oplockLevel = buffer[bufferIndex++]; 58 fid = readInt2( buffer, bufferIndex ); 59 bufferIndex += 2; 60 createAction = readInt4( buffer, bufferIndex ); 61 bufferIndex += 4; 62 creationTime = readTime( buffer, bufferIndex ); 63 bufferIndex += 8; 64 lastAccessTime = readTime( buffer, bufferIndex ); 65 bufferIndex += 8; 66 lastWriteTime = readTime( buffer, bufferIndex ); 67 bufferIndex += 8; 68 changeTime = readTime( buffer, bufferIndex ); 69 bufferIndex += 8; 70 extFileAttributes = readInt4( buffer, bufferIndex ); 71 bufferIndex += 4; 72 allocationSize = readInt8( buffer, bufferIndex ); 73 bufferIndex += 8; 74 endOfFile = readInt8( buffer, bufferIndex ); 75 bufferIndex += 8; 76 fileType = readInt2( buffer, bufferIndex ); 77 bufferIndex += 2; 78 deviceState = readInt2( buffer, bufferIndex ); 79 bufferIndex += 2; 80 directory = ( buffer[bufferIndex++] & 0xFF ) > 0; 81 82 return bufferIndex - start; 83 } 84 int readBytesWireFormat( byte[] buffer, int bufferIndex ) { 85 return 0; 86 } 87 public String toString() { 88 return new String ( "SmbComNTCreateAndXResponse[" + 89 super.toString() + 90 ",oplockLevel=" + oplockLevel + 91 ",fid=" + fid + 92 ",createAction=0x" + Hexdump.toHexString( createAction, 4 ) + 93 ",creationTime=" + new Date ( creationTime ) + 94 ",lastAccessTime=" + new Date ( lastAccessTime ) + 95 ",lastWriteTime=" + new Date ( lastWriteTime ) + 96 ",changeTime=" + new Date ( changeTime ) + 97 ",extFileAttributes=0x" + Hexdump.toHexString( extFileAttributes, 4 ) + 98 ",allocationSize=" + allocationSize + 99 ",endOfFile=" + endOfFile + 100 ",fileType=" + fileType + 101 ",deviceState=" + deviceState + 102 ",directory=" + directory + "]" ); 103 } 104 } 105 | Popular Tags |