protected Stream OpenFileOnlineInternal(IndexEntry idxInfo, MD5Hash key) { if (idxInfo != null) { Stream s = CDNIndex.OpenDataFile(idxInfo); return(new BLTEStream(s, key)); } else { Stream s = CDNIndex.OpenDataFileDirect(key); return(new BLTEStream(s, key)); } }
protected Stream OpenFileLocalInternal(IndexEntry idxInfo, MD5Hash key) { if (idxInfo != null) { using (Stream s = CDNIndex.OpenDataFile(idxInfo)) using (BLTEHandler blte = new BLTEHandler(s, key)) { return(blte.OpenFile(true)); } } else { using (Stream s = CDNIndex.OpenDataFileDirect(key)) using (BLTEHandler blte = new BLTEHandler(s, key)) { return(blte.OpenFile(true)); } } }
private Stream OpenFileOnline(byte[] key) { IndexEntry idxInfo = CDNIndex.GetIndexInfo(key); if (idxInfo != null) { using (Stream s = CDNIndex.OpenDataFile(idxInfo)) using (BLTEHandler blte = new BLTEHandler(s, key)) { return(blte.OpenFile(true)); } } else { using (Stream s = CDNIndex.OpenDataFileDirect(key)) using (BLTEHandler blte = new BLTEHandler(s, key)) { return(blte.OpenFile(true)); } } }