dotnet() public static method

Get a System.IO.Stream for the specified input stream.
public static dotnet ( InStream ins ) : Stream
ins InStream
return Stream
Example #1
0
        public static Pod load(InStream @in)
        {
            FPod fpod = null;

            try
            {
                fpod = new FPod(null, null);
                fpod.readFully(new ZipInputStream(SysInStream.dotnet(@in)));
            }
            catch (Exception e)
            {
                throw Err.make(e).val;
            }

            string name = fpod.m_podName;

            lock (m_podsByName)
            {
                // check for duplicate pod name
                if (m_podsByName[name] != null)
                {
                    throw Err.make("Duplicate pod name: " + name).val;
                }

                // create Pod and add to master table
                Pod pod = new Pod(fpod);
                m_podsByName[name] = pod; //new SoftReference(pod);
                return(pod);
            }
        }
Example #2
0
        //////////////////////////////////////////////////////////////////////////
        // Handlers
        //////////////////////////////////////////////////////////////////////////

        private void inHandler()
        {
            System.IO.Stream input  = SysInStream.dotnet(m_in);
            System.IO.Stream output = m_proc.StandardInput.BaseStream;
            byte[]           temp   = new byte[256];

            while (!m_proc.HasExited)
            {
                try
                {
                    int n = input.Read(temp, 0, temp.Length);
                    if (n < 0)
                    {
                        break;
                    }
                    output.Write(temp, 0, n);
                    output.Flush();
                }
                catch (System.Exception e)
                {
                    Err.dumpStack(e);
                }
            }
        }
Example #3
0
 private Zip(InStream ins)
 {
     this.m_zipIn = new ZipInputStream(SysInStream.dotnet(ins));
 }