Hashtable digests = new Hashtable(numEntries); Hashtable results = new Hashtable(numEntries); for (int i = 0; i < numEntries; i++) { String entry = is.readUTF(); int numMDs = is.readInt(); MessageDigest[] mds = new MessageDigest[numMDs]; byte[][] result = new byte[numMDs][]; for (int j = 0; j < numMDs; j++) {
Hashtable digests = null; Hashtable results = null; if (numEntries >= 0) { digests = new Hashtable(numEntries); results = new Hashtable(numEntries); for (int i = 0; i < numEntries; i++) { String entry = is.readUTF(); MessageDigest md; byte[] result;
	public StorageHook load(BaseData target, DataInputStream is) throws IOException {		if (lastIDLoaded > target.getBundleID())			loadChainCache.clear();		lastIDLoaded = target.getBundleID();		SignedStorageHook hook = new SignedStorageHook();		hook.bundledata = target;		boolean signed = is.readBoolean();		if (!signed)			return hook;		int numChains = is.readInt();		CertificateChain[] chains = new CertificateChain[numChains];		for (int i = 0; i < numChains; i++) {			int chainIdx = is.readInt();			if (chainIdx >= 0) {				chains[i] = (CertificateChain) loadChainCache.get(chainIdx);				if (chains[i] == null)					throw new IOException("Invalid chain cache."); //$NON-NLS-1$				continue;			}			String chain = is.readUTF();			boolean trusted = is.readBoolean();			int numCerts = is.readInt();			byte[][] certsBytes = new byte[numCerts][];			for (int j = 0; j < certsBytes.length; j++) {				int numBytes = is.readInt();				certsBytes[j] = new byte[numBytes];				is.readFully(certsBytes[j]);			}			try {				chains[i] = new PKCS7Processor(chain, trusted, certsBytes);			} catch (CertificateException e) {				throw new IOException(e.getMessage());			}			loadChainCache.add(chains[i]);		}		int numEntries = is.readInt();		Hashtable digests = new Hashtable(numEntries);		Hashtable results = new Hashtable(numEntries);		for (int i = 0; i < numEntries; i++) {			String entry = is.readUTF();			int numMDs = is.readInt();			MessageDigest[] mds = new MessageDigest[numMDs];			byte[][] result = new byte[numMDs][];			for (int j = 0; j < numMDs; j++) {				if (is.readInt() == 0)					mds[j] = SignedBundleFile.md5;				else					mds[j] = SignedBundleFile.sha1;				result[j] = new byte[is.readInt()];				is.readFully(result[j]);				digests.put(entry, mds);				results.put(entry, result);			}		}		String md5Result = null;		String shaResult = null;		if (is.readBoolean())			md5Result = is.readUTF();		if (is.readBoolean())			shaResult = is.readUTF();		hook.signedBundleFile = new SignedBundleFile(chains, digests, results, md5Result, shaResult);		return hook;	}