FileDocCategorySizeDatePackage
CMSProcessableFile.javaAPI DocBouncy Castle Crypto API 1.41 (Java 1.5)1103Wed Oct 01 10:55:28 BST 2008org.bouncycastle.cms

CMSProcessableFile

public class CMSProcessableFile extends Object implements CMSProcessable
a holding class for a file of data to be processed.

Fields Summary
private static final int
DEFAULT_BUF_SIZE
private final File
_file
private final byte[]
_buf
Constructors Summary
public CMSProcessableFile(File file)


     
         
    
        this(file, DEFAULT_BUF_SIZE);
    
public CMSProcessableFile(File file, int bufSize)

        _file = file;
        _buf = new byte[bufSize];
    
Methods Summary
public java.lang.ObjectgetContent()
Return the file handle.

        return _file;
    
public voidwrite(java.io.OutputStream zOut)

        FileInputStream     fIn = new FileInputStream(_file);
        int                 len;
        
        while ((len = fIn.read(_buf, 0, _buf.length)) > 0)
        {
            zOut.write(_buf, 0, len);
        }
        
        fIn.close();