classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] gnu/java/nio/channels/FileChannelImpl.java: move position f


From: Ito Kazumitsu
Subject: [cp-patches] gnu/java/nio/channels/FileChannelImpl.java: move position forward
Date: 12 Jan 2005 15:31:24 -0000
User-agent: SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) Emacs/21.3.50 (i386-unknown-freebsd5.3) MULE/5.0 (SAKAKI)

Hi,

I suggest the following patch, which fixes a bug: the position of the
source buffer does not get updated after the bytes have been written.

ChangeLog Entry:

2005-01-12  Ito Kazumitsu  <address@hidden>

        * gnu/java/nio/channels/FileChannelImpl.java
        (write(ByteBuffer)):
        Move the position of the source buffer forward.

###############
--- gnu/java/nio/channels/FileChannelImpl.java.orig     Mon May 10 00:16:27 2004
+++ gnu/java/nio/channels/FileChannelImpl.java  Thu Jan 13 00:14:52 2005
@@ -191,6 +191,7 @@
       {
        byte[] buffer = src.array();
        write(buffer, src.arrayOffset() + src.position(), len);
+       src.position(src.position() + len);
       }
     else
       {
###############




reply via email to

[Prev in Thread] Current Thread [Next in Thread]