digest.update(bytes, 0, bytes.length); } else if (o instanceof InputStream) { hashStream(digest, (InputStream) o); } else if (o instanceof Resource) { final InputStream in; throw new StreamException(e); hashStream(digest, in); } else { throw new IllegalArgumentException("Invalid input data type " + o);