Exemple #1
0
        public static void GetHBaseImageJS(string id)
        {
            CallHBase c = new CallHBase(id.Trim());
            Dictionary <byte[], TCell> konj = c.GetHBaseImage();

            byte[] file = new byte[600000];

            foreach (KeyValuePair <byte[], TCell> singleRow in konj)
            {
                //File.WriteAllBytes(@"c:\test\output.docx", singleRow.Value.Value);
                file = singleRow.Value.Value;
            }

            int    fileSize = file.Length;
            String Name     = QuerySolrFile(id);

            string strdocPath;

            strdocPath = @"C:\Users\HDP\Downloads\" + Name;
            FileStream objfilestream = new FileStream(strdocPath, FileMode.Create, FileAccess.ReadWrite);

            objfilestream.Write(file, 0, file.Length);
            objfilestream.Close();
            System.Diagnostics.Process.Start(@"C:\Users\HDP\Downloads\" + Name);
        }
Exemple #2
0
        public static void GetHBaseImageJS(string id)
        {
            CallHBase c = new CallHBase(id.Trim());
            Dictionary<byte[], TCell> konj = c.GetHBaseImage();

            byte[] file = new byte[600000];

            foreach (KeyValuePair<byte[], TCell> singleRow in konj)
            {
                //File.WriteAllBytes(@"c:\test\output.docx", singleRow.Value.Value);
                file = singleRow.Value.Value;
            }

            int fileSize = file.Length;
            String Name = QuerySolrFile(id);

            string strdocPath;
            strdocPath = @"C:\Users\HDP\Downloads\" + Name;
            FileStream objfilestream = new FileStream(strdocPath, FileMode.Create, FileAccess.ReadWrite);
            objfilestream.Write(file, 0, file.Length);
            objfilestream.Close();
            System.Diagnostics.Process.Start(@"C:\Users\HDP\Downloads\" + Name);
        }