KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jcifs > smb > SmbComOpenAndXResponse


1 /* jcifs smb client library in Java
2  * Copyright (C) 2000 "Michael B. Allen" <jcifs at samba dot org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19 package jcifs.smb;
20
21 import java.io.IOException JavaDoc;
22 import java.io.InputStream JavaDoc;
23
24 class SmbComOpenAndXResponse extends AndXServerMessageBlock {
25
26     int fid,
27         fileAttributes,
28         dataSize,
29         grantedAccess,
30         fileType,
31         deviceState,
32         action,
33         serverFid;
34     long lastWriteTime;
35
36     SmbComOpenAndXResponse() {
37     }
38
39     int writeParameterWordsWireFormat( byte[] dst, int dstIndex ) {
40         return 0;
41     }
42     int writeBytesWireFormat( byte[] dst, int dstIndex ) {
43         return 0;
44     }
45     int readParameterWordsWireFormat( byte[] buffer, int bufferIndex ) {
46         int start = bufferIndex;
47
48         fid = readInt2( buffer, bufferIndex );
49         bufferIndex += 2;
50         fileAttributes = readInt2( buffer, bufferIndex );
51         bufferIndex += 2;
52         lastWriteTime = readUTime( buffer, bufferIndex );
53         bufferIndex += 4;
54         dataSize = readInt4( buffer, bufferIndex );
55         bufferIndex += 4;
56         grantedAccess = readInt2( buffer, bufferIndex );
57         bufferIndex += 2;
58         fileType = readInt2( buffer, bufferIndex );
59         bufferIndex += 2;
60         deviceState = readInt2( buffer, bufferIndex );
61         bufferIndex += 2;
62         action = readInt2( buffer, bufferIndex );
63         bufferIndex += 2;
64         serverFid = readInt4( buffer, bufferIndex );
65         bufferIndex += 6;
66
67         return bufferIndex - start;
68     }
69     int readBytesWireFormat( byte[] buffer, int bufferIndex ) {
70         return 0;
71     }
72     public String JavaDoc toString() {
73         return new String JavaDoc( "SmbComOpenAndXResponse[" +
74             super.toString() +
75             ",fid=" + fid +
76             ",fileAttributes=" + fileAttributes +
77             ",lastWriteTime=" + lastWriteTime +
78             ",dataSize=" + dataSize +
79             ",grantedAccess=" + grantedAccess +
80             ",fileType=" + fileType +
81             ",deviceState=" + deviceState +
82             ",action=" + action +
83             ",serverFid=" + serverFid + "]" );
84     }
85 }
86
Popular Tags