01: /* jcifs smb client library in Java
02: * Copyright (C) 2000 "Michael B. Allen" <jcifs at samba dot org>
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2.1 of the License, or (at your option) any later version.
08: *
09: * 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 com.knowgate.jcifs.smb;
20:
21: import java.io.IOException;
22: import java.io.InputStream;
23:
24: class SmbComOpenAndXResponse extends AndXServerMessageBlock {
25:
26: int fid, fileAttributes, dataSize, grantedAccess, fileType,
27: deviceState, action, serverFid;
28: long lastWriteTime;
29:
30: SmbComOpenAndXResponse() {
31: }
32:
33: int writeParameterWordsWireFormat(byte[] dst, int dstIndex) {
34: return 0;
35: }
36:
37: int writeBytesWireFormat(byte[] dst, int dstIndex) {
38: return 0;
39: }
40:
41: int readParameterWordsWireFormat(byte[] buffer, int bufferIndex) {
42: int start = bufferIndex;
43:
44: fid = readInt2(buffer, bufferIndex);
45: bufferIndex += 2;
46: fileAttributes = readInt2(buffer, bufferIndex);
47: bufferIndex += 2;
48: lastWriteTime = readUTime(buffer, bufferIndex);
49: bufferIndex += 4;
50: dataSize = readInt4(buffer, bufferIndex);
51: bufferIndex += 4;
52: grantedAccess = readInt2(buffer, bufferIndex);
53: bufferIndex += 2;
54: fileType = readInt2(buffer, bufferIndex);
55: bufferIndex += 2;
56: deviceState = readInt2(buffer, bufferIndex);
57: bufferIndex += 2;
58: action = readInt2(buffer, bufferIndex);
59: bufferIndex += 2;
60: serverFid = readInt4(buffer, bufferIndex);
61: bufferIndex += 6;
62:
63: return bufferIndex - start;
64: }
65:
66: int readBytesWireFormat(byte[] buffer, int bufferIndex) {
67: return 0;
68: }
69:
70: int readBytesDirectWireFormat(InputStream in, int byteCount,
71: byte[] buffer, int bufferIndex) throws IOException {
72: return 0;
73: }
74:
75: public String toString() {
76: return new String("SmbComOpenAndXResponse[" + super .toString()
77: + ",fid=" + fid + ",fileAttributes=" + fileAttributes
78: + ",lastWriteTime=" + lastWriteTime + ",dataSize="
79: + dataSize + ",grantedAccess=" + grantedAccess
80: + ",fileType=" + fileType + ",deviceState="
81: + deviceState + ",action=" + action + ",serverFid="
82: + serverFid + "]");
83: }
84: }
|