OpenDataFileDirect() 공개 메소드

public OpenDataFileDirect ( MD5Hash key ) : Stream
key MD5Hash
리턴 Stream
예제 #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));
     }
 }
예제 #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));
             }
     }
 }
예제 #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));
                    }
            }
        }