import java.net.*; import java.io.*; import java.util.Stack; import java.util.Date; import java.math.BigInteger; /** *
* Downloader calls the BinaryLinkExtractor * to extract all the links to binary files in a given HTML document. After * a list of binary file links is obtained, it places them on a stack. Each * file on the stack is downloaded eight consecutive times. The time it takes * to download the file is examined. If it is an even number, a 0 bit is recorded, * otherwise a 1 bit is recorded. One byte of entropy is obtained from each * binary file link. = 0) { bytesread = theImage.read(b, 0, bfr); if (bytesread == -1) break; } end_time = new Date(); } catch ( Exception e ) { System.err.println(e); return (-1); } long dtime = end_time.getTime() - start_time.getTime(); if ( dtime < 50 ) return -1; return ( dtime ); } }