* @tests java.security.DigestInputStream#read(byte[], int, int)
*/
public void test_read$BII() throws IOException {
// Test for method int java.security.DigestInputStream.read(byte [],
// int, int)
DigestInputStream dis = new DigestInputStream(inStream, digest);
int bytesToRead = inStream.available();
byte buf1[] = new byte[bytesToRead + 5];
byte buf2[] = new byte[bytesToRead + 5];
// make sure we're actually reading some data
assertTrue("No data to read for this test", bytesToRead>0);
// read and compare the data that the inStream has
int bytesRead1 = dis.read(buf1, 5, bytesToRead);
int bytesRead2 = inStream1.read(buf2, 5, bytesToRead);
assertEquals("Didn't read the same from each stream", bytesRead1,
bytesRead2);
assertEquals("Didn't read the entire", bytesRead1, bytesToRead);
// compare the arrays