Return-Path: Delivered-To: apmail-mina-dev-archive@www.apache.org Received: (qmail 55926 invoked from network); 15 Dec 2010 01:24:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Dec 2010 01:24:18 -0000 Received: (qmail 63233 invoked by uid 500); 15 Dec 2010 01:24:18 -0000 Delivered-To: apmail-mina-dev-archive@mina.apache.org Received: (qmail 63192 invoked by uid 500); 15 Dec 2010 01:24:18 -0000 Mailing-List: contact dev-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list dev@mina.apache.org Received: (qmail 63184 invoked by uid 99); 15 Dec 2010 01:24:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 01:24:18 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 74.125.82.51 as permitted sender) Received: from [74.125.82.51] (HELO mail-ww0-f51.google.com) (74.125.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Dec 2010 01:24:10 +0000 Received: by wwe15 with SMTP id 15so1046648wwe.32 for ; Tue, 14 Dec 2010 17:23:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=KK21IaZwTN063vWf/veRmsw7BSSNWIP4Wdcc49CFTwA=; b=CyCjXIvQgEZJCoUKlaZ5262+csh6VHr6ugBKXUSZ2+LxzFmcrqblNbb4Ruy+Gcx47P Pu/fK6cG19JLSyXpBG6aErgnfswQPgU98TjzU30b4s36fhHiIafUlNVTl8nNZ5lvSDI8 QZC0a08mhAOYli3guvncz8dzpjYDdmA/vQuzY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=jO85sgmCYWojYEPJ40//ei3YOyGkR+nTtENrKBUYpGptSSzbRg6M/fE1PUiyo8oXAo gxOrv99NoBZ72WESBZBs47Gg9mupLWkQSRPSOoIEE7FMQDitWESooax1pIOrPyfWMEjh lCdiHvQe3eoVlIYXtrsgVJqqECSahSWL/jPhA= Received: by 10.216.181.196 with SMTP id l46mr402201wem.65.1292376229477; Tue, 14 Dec 2010 17:23:49 -0800 (PST) Received: from emmanuel-lecharnys-MacBook-Pro.local (ran75-1-78-192-106-184.fbxo.proxad.net [78.192.106.184]) by mx.google.com with ESMTPS id p4sm524465wer.29.2010.12.14.17.23.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 14 Dec 2010 17:23:48 -0800 (PST) Message-ID: <4D0818A3.30508@gmail.com> Date: Wed, 15 Dec 2010 02:23:47 +0100 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: dev@mina.apache.org Subject: Re: Hello, a simple question References: <002501cb9bf3$db8ed400$651014ac@acer3b5ce0329f> In-Reply-To: <002501cb9bf3$db8ed400$651014ac@acer3b5ce0329f> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 12/15/10 2:03 AM, zhuhaofeng wrote: > Hello, I have a simple question. I am making a project with MINA 2.0.1. > > Which buffers do I get by default, direct buffers or heap buffers? The default is heap buffers. > If I can get heap buffers by default, why do the MINA group recommend me use the sentence "IoBuffer.setUseDirectBuffer(false);" to get heap buffers. It does not, AFAICT. It's just given as an example on the Javadoc. Whatever you want to do, using a direct buffer is something you should not do, unless you have some very specific needs. -- Regards, Cordialement, Emmanuel L��charny www.iktek.com