// the below case should not occur because /dev/random or /dev/urandom is a special file
// hence, if it is happened there is some internal problem
if ( bytesRead == -1 ) {
throw new ProviderException(
Messages.getString("security.193") ); //$NON-NLS-1$
}
total += bytesRead;
offset += bytesRead;
if ( total >= numBytes ) {
break;
}
}
} catch (IOException e) {
// actually there should be no IOException because device is a special file;
// hence, there is either some internal problem or, for instance,
// device was removed in runtime, or something else
throw new ProviderException(
Messages.getString("security.194"), e ); //$NON-NLS-1$
}
return bytes;
}