Code example for CheckedInputStream

Methods: getChecksum

	 * @tests, 
	public void test_ConstructorLjava_io_InputStreamLjava_util_zip_Checksum() throws Exception { 
        InputStream checkInput = Support_Resources.getStream("hyts_checkInput.txt");
        CheckedInputStream checkIn = new CheckedInputStream(checkInput, new CRC32());
        assertEquals("constructor of checkedInputStream has failed", 0, checkIn.getChecksum()
	 * @tests 
	public void test_getChecksum() throws Exception { 
        byte outBuf[] = new byte[100];
        // testing getChecksum for an empty file 
        FileOutputStream outEmp = new FileOutputStream("empty.txt");
        InputStream inEmp = new FileInputStream("empty.txt");
Stop searching for code, let great code find you!  Add Codota to your java IDE