FileDocCategorySizeDatePackage
Trans2SetFileInformation.javaAPI DocJCIFS 1.3.17 API3264Tue Oct 18 15:26:24 BST 2011jcifs.smb

Trans2SetFileInformation

public class Trans2SetFileInformation extends SmbComTransaction

Fields Summary
static final int
SMB_FILE_BASIC_INFO
private int
fid
private int
attributes
private long
createTime
private long
lastWriteTime
Constructors Summary
Trans2SetFileInformation(int fid, int attributes, long createTime, long lastWriteTime)


              
        this.fid = fid;
        this.attributes = attributes;
        this.createTime = createTime;
        this.lastWriteTime = lastWriteTime;
        command = SMB_COM_TRANSACTION2;
        subCommand = TRANS2_SET_FILE_INFORMATION;
        maxParameterCount = 6;
        maxDataCount = 0;
        maxSetupCount = (byte)0x00;
    
Methods Summary
intreadDataWireFormat(byte[] buffer, int bufferIndex, int len)

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

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

        return 0;
    
public java.lang.StringtoString()

        return new String( "Trans2SetFileInformation[" + super.toString() +
            ",fid=" + fid + "]" );
    
intwriteDataWireFormat(byte[] dst, int dstIndex)

        int start = dstIndex;

        writeTime( createTime, dst, dstIndex ); dstIndex += 8;
        writeInt8( 0L, dst, dstIndex ); dstIndex += 8;
        writeTime( lastWriteTime, dst, dstIndex ); dstIndex += 8;
        writeInt8( 0L, dst, dstIndex ); dstIndex += 8;
/* Samba 2.2.7 needs ATTR_NORMAL
 */
        writeInt2( 0x80 | attributes, dst, dstIndex ); dstIndex += 2; 
                                        /* 6 zeros observed with NT */
        writeInt8( 0L, dst, dstIndex ); dstIndex += 6;

                /* Also observed 4 byte alignment but we stick
                 * with the default for jCIFS which is 2 */

        return dstIndex - start;
    
intwriteParametersWireFormat(byte[] dst, int dstIndex)

        int start = dstIndex;

        writeInt2( fid, dst, dstIndex );
        dstIndex += 2;
        writeInt2( SMB_FILE_BASIC_INFO, dst, dstIndex );
        dstIndex += 2;
        writeInt2( 0, dst, dstIndex );
        dstIndex += 2;

        return dstIndex - start;
    
intwriteSetupWireFormat(byte[] dst, int dstIndex)

        dst[dstIndex++] = subCommand;
        dst[dstIndex++] = (byte)0x00;
        return 2;