FileDocCategorySizeDatePackage
Trans2QueryFSInformationResponse.javaAPI DocJCIFS 1.3.17 API5394Tue Oct 18 15:26:24 BST 2011jcifs.smb

Trans2QueryFSInformationResponse

public class Trans2QueryFSInformationResponse extends SmbComTransactionResponse

Fields Summary
static final int
SMB_INFO_ALLOCATION
static final int
SMB_QUERY_FS_SIZE_INFO
static final int
SMB_FS_FULL_SIZE_INFORMATION
private int
informationLevel
AllocInfo
info
Constructors Summary
Trans2QueryFSInformationResponse(int informationLevel)

        this.informationLevel = informationLevel;
        command = SMB_COM_TRANSACTION2;
        subCommand = SmbComTransaction.TRANS2_QUERY_FS_INFORMATION;
    
Methods Summary
intreadDataWireFormat(byte[] buffer, int bufferIndex, int len)

        switch( informationLevel ) {
            case SMB_INFO_ALLOCATION:
                return readSmbInfoAllocationWireFormat( buffer, bufferIndex );
            case SMB_QUERY_FS_SIZE_INFO:
                return readSmbQueryFSSizeInfoWireFormat( buffer, bufferIndex );
            case SMB_FS_FULL_SIZE_INFORMATION:
                return readFsFullSizeInformationWireFormat( buffer, bufferIndex );
            default:
                return 0;
        }
    
intreadFsFullSizeInformationWireFormat(byte[] buffer, int bufferIndex)

        int start = bufferIndex;
        
        SmbInfoAllocation info = new SmbInfoAllocation();
        
        // Read total allocation units.
        info.alloc = readInt8( buffer, bufferIndex );
        bufferIndex += 8;
        
        // read caller available allocation units 
        info.free = readInt8( buffer, bufferIndex );
        bufferIndex += 8;

        // skip actual free units
        bufferIndex += 8;
        
        info.sectPerAlloc = readInt4( buffer, bufferIndex );
        bufferIndex += 4;
        
        info.bytesPerSect = readInt4( buffer, bufferIndex );
        bufferIndex += 4;

        this.info = info;

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

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

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

        int start = bufferIndex;

        SmbInfoAllocation info = new SmbInfoAllocation();

        bufferIndex += 4; // skip idFileSystem

        info.sectPerAlloc = readInt4( buffer, bufferIndex );
        bufferIndex += 4;

        info.alloc = readInt4( buffer, bufferIndex );
        bufferIndex += 4;

        info.free = readInt4( buffer, bufferIndex );
        bufferIndex += 4;

        info.bytesPerSect = readInt2( buffer, bufferIndex );
        bufferIndex += 4;

        this.info = info;

        return bufferIndex - start;
    
intreadSmbQueryFSSizeInfoWireFormat(byte[] buffer, int bufferIndex)

        int start = bufferIndex;

        SmbInfoAllocation info = new SmbInfoAllocation();

        info.alloc = readInt8( buffer, bufferIndex );
        bufferIndex += 8;

        info.free = readInt8( buffer, bufferIndex );
        bufferIndex += 8;

        info.sectPerAlloc = readInt4( buffer, bufferIndex );
        bufferIndex += 4;

        info.bytesPerSect = readInt4( buffer, bufferIndex );
        bufferIndex += 4;

        this.info = info;

        return bufferIndex - start;
    
public java.lang.StringtoString()

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

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

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

        return 0;