OpenDataFile() public method

public OpenDataFile ( IndexEntry entry ) : Stream
entry IndexEntry
return Stream
Exemplo n.º 1
0
 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));
     }
 }
Exemplo n.º 2
0
 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));
             }
     }
 }
Exemplo n.º 3
0
        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));
                    }
            }
        }