Code example for ParcelFileDescriptor

Methods: getStatSize

     * @param pfd The input file to compare the size of 
     * @param size The expected size of the file 
    protected void verifyFileSize(ParcelFileDescriptor pfd, long size) {
        assertEquals(pfd.getStatSize(), size);
     * Helper to create and register a new MultipleDownloadCompletedReciever 
     * This is used to track many simultaneous downloads by keeping count of all the downloads 
     * that have completed. 
     * @return A new receiver that records and can be queried on how many downloads have completed. 
    protected MultipleDownloadsCompletedReceiver registerNewMultipleDownloadsReceiver() { 
        MultipleDownloadsCompletedReceiver receiver = new MultipleDownloadsCompletedReceiver();
        mContext.registerReceiver(receiver, new IntentFilter(