Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 97314 invoked from network); 1 Aug 2005 13:19:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Aug 2005 13:19:38 -0000 Received: (qmail 72498 invoked by uid 500); 1 Aug 2005 13:19:29 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 71954 invoked by uid 500); 1 Aug 2005 13:19:25 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 71940 invoked by uid 99); 1 Aug 2005 13:19:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 06:19:25 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [152.66.208.40] (HELO balu.sch.bme.hu) (152.66.208.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Aug 2005 06:19:14 -0700 Received: from [152.66.208.12] by balu.sch.bme.hu (Sun Java System Messaging Server 6.2-2.05 (built Apr 28 2005)) with ESMTPS id <0IKJ00IYIP039X10@balu.sch.bme.hu> for commons-user@jakarta.apache.org; Mon, 01 Aug 2005 15:19:20 +0200 (CEST) Date: Mon, 01 Aug 2005 15:19:15 +0200 From: SOMOGYI Erzsebet Subject: Re: [Net-Telnet] Line feed problems with login In-reply-to: <31074E2AC8D42447B2D92473E37B9240011F06C2@sydex1.ap.marconi.com> To: Jakarta Commons Users List Message-id: <42EE2153.7020408@impulzus.sch.bme.hu> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en References: <31074E2AC8D42447B2D92473E37B9240011F06C2@sydex1.ap.marconi.com> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi! Adam Stuckey wrote: > Is there a way to either prevent this additional "\n" being appended? I am > using the out.write( byte ) method rather than out.writeln( byte[] ) so I > don't know where the additional "\n" is coming from. I also had some \r\n problems. TelnetClient always sends \r\n as end of line and doesn't care if you tries to send only \r or \n. Conversion is done in org.apache.commons.net.TelnetOutputStream in write(int ch) _and_ in org.apache.commons.io.ToNetASCIIOutputStream in write(int ch). Output stream of TelnetClient is a ToNetASCIIOutputStream which is initialized with a TelnetOutputStream (see _connectAction_() of TelnetClient). You could try set __convertCRtoCRLF in TelnetOutputStream to false or modify write method, and modify write method of ToNetASCIIOutputStream. Finally I solved my problem on server side instead of modifing the source codes, so I'm not sure about this solution. Regards, Rzso --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org