Ejemplo n.º 1
0
        /// <summary> Close the Channel.  The channel is only closed, it is
        /// the responsibility of the "closer" to remove the channel from
        /// the channel table.
        /// </summary>

        internal virtual void Close()
        {
            IOException ex = null;

            if (input != null)
            {
                try
                {
                    input.close();
                }
                catch (IOException e)
                {
                    ex = e;
                }
                input = null;
            }

            if (output != null)
            {
                try
                {
                    output.close();
                }
                catch (IOException e)
                {
                    ex = e;
                }
                output = null;
            }

            if (ex != null)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        /// <summary> Setup the TclOutputStream on the first call to write</summary>

        protected internal void initOutput()
        {
            if (output != null)
            {
                return;
            }

            output             = new TclOutputStream(OutputStream);
            output.Encoding    = encoding;
            output.Translation = outputTranslation;
            output.EofChar     = outputEofChar;
            output.Buffering   = buffering;
            output.BufferSize  = bufferSize;
            output.Blocking    = blocking;
        }
Ejemplo n.º 3
0
        /// <summary> Setup the TclOutputStream on the first call to write</summary>

        protected internal void initOutput()
        {
            if (output != null)
                return;

            output = new TclOutputStream(OutputStream);
            output.Encoding = encoding;
            output.Translation = outputTranslation;
            output.EofChar = outputEofChar;
            output.Buffering = buffering;
            output.BufferSize = bufferSize;
            output.Blocking = blocking;
        }
Ejemplo n.º 4
0
        /// <summary> Close the Channel.  The channel is only closed, it is 
        /// the responsibility of the "closer" to remove the channel from 
        /// the channel table.
        /// </summary>

        internal virtual void Close()
        {

            IOException ex = null;

            if (input != null)
            {
                try
                {
                    input.close();
                }
                catch (IOException e)
                {
                    ex = e;
                }
                input = null;
            }

            if (output != null)
            {
                try
                {
                    output.close();
                }
                catch (IOException e)
                {
                    ex = e;
                }
                output = null;
            }

            if (ex != null)
                throw ex;
        }