SmbComWritepublic class SmbComWrite extends ServerMessageBlock
Fields Summary |
---|
private int | fid | private int | count | private int | offset | private int | remaining | private int | off | private byte[] | b |
Constructors Summary |
---|
SmbComWrite()
super();
command = SMB_COM_WRITE;
| SmbComWrite(int fid, int offset, int remaining, byte[] b, int off, int len)
this.fid = fid;
this.count = len;
this.offset = offset;
this.remaining = remaining;
this.b = b;
this.off = off;
command = SMB_COM_WRITE;
|
Methods Summary |
---|
int | readBytesWireFormat(byte[] buffer, int bufferIndex)
return 0;
| int | readParameterWordsWireFormat(byte[] buffer, int bufferIndex)
return 0;
| void | setParam(int fid, long offset, int remaining, byte[] b, int off, int len)
this.fid = fid;
this.offset = (int)(offset & 0xFFFFFFFFL);
this.remaining = remaining;
this.b = b;
this.off = off;
count = len;
digest = null; /* otherwise recycled commands
* like writeandx will choke if session
* closes in between */
| public java.lang.String | toString()
return new String( "SmbComWrite[" +
super.toString() +
",fid=" + fid +
",count=" + count +
",offset=" + offset +
",remaining=" + remaining + "]" );
| int | writeBytesWireFormat(byte[] dst, int dstIndex)
int start = dstIndex;
dst[dstIndex++] = (byte)0x01; /* BufferFormat */
writeInt2( count, dst, dstIndex ); /* DataLength? */
dstIndex += 2;
System.arraycopy( b, off, dst, dstIndex, count );
dstIndex += count;
return dstIndex - start;
| int | writeParameterWordsWireFormat(byte[] dst, int dstIndex)
int start = dstIndex;
writeInt2( fid, dst, dstIndex );
dstIndex += 2;
writeInt2( count, dst, dstIndex );
dstIndex += 2;
writeInt4( offset, dst, dstIndex );
dstIndex += 4;
writeInt2( remaining, dst, dstIndex );
dstIndex += 2;
return dstIndex - start;
|
|