Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 87194 invoked from network); 26 Jul 2006 14:12:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jul 2006 14:12:00 -0000 Received: (qmail 87375 invoked by uid 500); 26 Jul 2006 14:11:59 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 87344 invoked by uid 500); 26 Jul 2006 14:11:59 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 87330 invoked by uid 99); 26 Jul 2006 14:11:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jul 2006 07:11:59 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of tomonaka@basil.ocn.ne.jp designates 222.146.51.83 as permitted sender) Received: from [222.146.51.83] (HELO smtp.basil.ocn.ne.jp) (222.146.51.83) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jul 2006 07:11:58 -0700 Received: from [192.168.0.8] (p7056-adsau12honb5-acca.tokyo.ocn.ne.jp [220.96.168.56]) by smtp.basil.ocn.ne.jp (Postfix) with ESMTP id D74D46F3C for ; Wed, 26 Jul 2006 23:11:36 +0900 (JST) Received: from 127.0.0.1 (AVG SMTP 7.1.394 [268.10.4/399]); Wed, 26 Jul 2006 23:18:02 +0900 Message-ID: <44C77999.7070106@basil.ocn.ne.jp> Date: Wed, 26 Jul 2006 23:18:01 +0900 From: TomohitoNakayama User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: ja, en-us, en MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: [jira] Updated: (DERBY-1417) Add new, lengthless overloads to the streaming api References: <13714092.1153920554900.JavaMail.jira@brutus> In-Reply-To: <13714092.1153920554900.JavaMail.jira@brutus> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Kristian. Thank you for taking my consideration into the patch and fix failure in the name of class ! One more my opinion .... In some encodings, such as UTF-16 "with Byte Order Mark" or ISO-2022-JP, length of encoded bytes array is not just multiple of characters count. In those cases, length of Byte Order Mark or escape sequences is needed to be added and maxBytesPerChar approach can be a nasty trap. I think simple honest approach would be better. Such as passing max count of characters and max count of encoded bytes array directly to constructor. I hope you to take this opinion into account... Best regards. Kristian Waagan (JIRA) wrote: > [ http://issues.apache.org/jira/browse/DERBY-1417?page=all ] > >Kristian Waagan updated DERBY-1417: >----------------------------------- > > Attachment: derby-1417-6b-clientimpl.diff > >'derby-1417-6b-clientimpl.diff' deprecates 6a. >Changes: > 1) Add missing license to two files. > 2) Added static factory methods to EncodedInputStream for UTF-8- and UTF-16BE-streams. > Set byte buffer size to 3 and 2 times size of char buffer, respectively. > 'createUTF8Stream' is public, 'createUTF16BEStream' is package private. > I made class 'EncodedInputStream' public final, and its constructor private. > 3) Updated two classes (Request and Clob) to use the new static methods. > >When applying patch, do a 'svn rename java/client/org/apache/derby/client/net/UTF32BEEncodedInputStream.java java/client/org/apache/derby/client/net/EncodedInputStream.java' first. Just press ENTER (answer no) at the two prompts when running the patch tool. > > > >>Add new, lengthless overloads to the streaming api >>-------------------------------------------------- >> >> Key: DERBY-1417 >> URL: http://issues.apache.org/jira/browse/DERBY-1417 >> Project: Derby >> Issue Type: New Feature >> Components: JDBC >> Affects Versions: 10.2.0.0 >> Reporter: Rick Hillegas >> Assigned To: Kristian Waagan >> Fix For: 10.2.0.0 >> >> Attachments: derby-1417-01-castsInTests.diff, derby-1417-1a-notImplemented.diff, derby-1417-1a-notImplemented.stat, derby-1417-2a-rstest-refactor.diff, derby-1417-3a-embimpl-and-tests.diff, derby-1417-3a-embimpl-and-tests.stat, derby-1417-3b-embimpl-and-tests.diff, derby-1417-3b-embimpl-and-tests.stat, derby-1417-4a-disable-psTestsDnc.diff, derby-1417-5a-brokered.diff, derby-1417-5a-brokered.stat, derby-1417-6a-clientimpl.diff, derby-1417-6a-clientimpl.stat, derby-1417-6b-clientimpl.diff >> >> >>The JDBC4 Expert Group has approved a new set of overloads for the streaming methods. These overloads do not take a length argument. Here are the new overloads: >>PreparedStatement.setAsciiStream(int parameterIndex, java.io.InputStream x) >>PreparedStatement.setBinaryStream(int parameterIndex, java.io.InputStream x) >>PreparedStatement.setCharacterStream(int parameterIndex, java.io.Reader reader) >>PreparedStatement.setNCharacterStream(int parameterIndex, java.io.Reader reader) >>PreparedStatement.setBlob(int parameterIndex, java.io.InputStream inputStream) >>PreparedStatement.setClob(int parameterIndex, java.io.Reader reader) >>PreparedStatement.setNClob(int parameterIndex, java.io.Reader reader) >>CallableStatement.setAsciiStream(java.lang.String parameterName, java.io.InputStream x) >>CallableStatement.setBinaryStream(java.lang.String parameterName, java.io.InputStream x) >>CallableStatement.setCharacterStream(java.lang.String parameterName, java.io.Reader reader) >>CallableStatement.setNCharacterStream(java.lang.String parameterName, java.io.Reader reader) >>CallableStatement.setBlob(java.lang.String parameterName, java.io.InputStream inputStream) >>CallableStatement.setClob(java.lang.String parameterName, java.io.Reader reader) >>CallableStatement.setNClob(java.lang.String parameterName, java.io.Reader reader) >>ResultSet.updateAsciiStream(int columnIndex, java.io.InputStream x) >>ResultSet.updateAsciiStream(java.lang.String columnLabel, java.io.InputStream x) >>ResultSet.updateBinaryStream(int columnIndex, java.io.InputStream x) >>ResultSet.updateBinaryStream(java.lang.String columnLabel, java.io.InputStream x, int length) >>ResultSet.updateCharacterStream(int columnIndex, java.io.Reader x) >>ResultSet.updateCharacterStream(java.lang.String columnLabel, java.io.Reader x) >>ResultSet.updateNCharacterStream(int columnIndex, java.io.Reader x) >>ResultSet.updateNCharacterStream(java.lang.String columnLabel, java.io.Reader x) >>ResultSet.updateBlob(int columnIndex, java.io.InputStream inputStream) >>ResultSet.updateBlob(java.lang.String columnLabel, java.io.InputStream inputStream) >>ResultSet.updateClob(int columnIndex, java.io.Reader reader) >>ResultSet.updateClob(java.lang.String columnLabel, java.io.Reader reader) >>ResultSet.updateNClob(int columnIndex, java.io.Reader reader) >>ResultSet.updateNClob(java.lang.String columnLabel, java.io.Reader reader) >>We should add these new overloads soon so that the build will not break when this methods turn up in a published Mustang build. >> >> > > > -- /* Tomohito Nakayama tomonaka@basil.ocn.ne.jp tomohito@rose.zero.ad.jp tmnk@apache.org Naka http://www5.ocn.ne.jp/~tomohito/TopPage.html */