getOtpInputStream() private method

private getOtpInputStream ( int offset ) : OtpInputStream
offset int
return OtpInputStream
 // used by the other message types
 protected void do_send(OtpOutputStream header)
 {
     lock (this)
     {
         try
         {
             if (traceLevel >= ctrlThreshold)
             {
                 try
                 {
                     OtpErlangObject h = header.getOtpInputStream(5).read_any();
                     log.Debug("-> " + headerType(h) + " " + h);
                 }
                 catch (OtpErlangDecodeException e)
                 {
                     log.Debug("   " + "can't decode output buffer: " + e);
                 }
             }
             header.WriteTo(socket.GetOutputStream());
         }
         catch (IOException e)
         {
             close();
             throw e;
         }
     }
 }
        // used by send and send_reg (message types with payload)
        protected void do_send(OtpOutputStream header, OtpOutputStream payload)
        {
            lock (this)
            {
                try
                {
                    if (traceLevel >= sendThreshold)
                    {
                        // Need to decode header and output buffer to show trace
                        // message!
                        // First make OtpInputStream, then decode.
                        try
                        {
                            OtpErlangObject h = header.getOtpInputStream(5).read_any();

                            log.Debug("-> " + headerType(h) + " " + h);

                            OtpErlangObject o = payload.getOtpInputStream(0).read_any();
                            log.Debug("   " + o);
                            o = null;
                        }
                        catch (OtpErlangDecodeException e)
                        {
                            log.Debug("   " + "can't decode output buffer:" + e);
                        }
                    }

                    header.WriteTo(socket.GetOutputStream());
                    payload.WriteTo(socket.GetOutputStream());
                }
                catch (IOException e)
                {
                    close();
                    throw e;
                }
            }
        }