public static void compareFiles(File f1, File f2) throws IOException {
		assertEquals(f1.length(), f2.length());
		try (BufferedInputStream b1 = new BufferedInputStream(new FileInputStream(f1));
				BufferedInputStream b2 = new BufferedInputStream(new FileInputStream(f2))) {
			byte[] buf1 = new byte[1024 * 16], buf2 = new byte[1024 * 16];
			
			while (true) {
				boolean eof = readFully(b1, buf1);
				if (eof) {
					break;
				}
				readFully(b2, buf2);
				assertArrayEquals(buf1, buf2);
			}
		}
	}