FileDocCategorySizeDatePackage
SmbComWrite.javaAPI DocJCIFS 1.3.17 API3159Tue Oct 18 15:26:24 BST 2011jcifs.smb

SmbComWrite

public 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
intreadBytesWireFormat(byte[] buffer, int bufferIndex)

        return 0;
    
intreadParameterWordsWireFormat(byte[] buffer, int bufferIndex)

        return 0;
    
voidsetParam(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.StringtoString()

        return new String( "SmbComWrite[" +
            super.toString() +
            ",fid=" + fid +
            ",count=" + count +
            ",offset=" + offset +
            ",remaining=" + remaining + "]" );
    
intwriteBytesWireFormat(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;
    
intwriteParameterWordsWireFormat(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;