UTF_8.java (decodeLoop): Set inPos to in.position().
authorJulian Scheid <julian@sektor37.de>
Wed, 16 Feb 2005 23:33:02 +0000 (23:33 +0000)
committerMark Wielaard <mark@gcc.gnu.org>
Wed, 16 Feb 2005 23:33:02 +0000 (23:33 +0000)
2005-02-16  Julian Scheid  <julian@sektor37.de>

       * gnu/java/nio/charset/UTF_8.java (decodeLoop): Set inPos to
       in.position().
       (encodeLoop): Likewise.

From-SVN: r95125

libjava/ChangeLog
libjava/gnu/java/nio/charset/UTF_8.java

index f928e364c4b20f206430c96829851e6400a6c4eb..1334e890fdd07a70a7b6c2d4678efb49bc2b3ae3 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-16  Julian Scheid  <julian@sektor37.de>
+
+       * gnu/java/nio/charset/UTF_8.java (decodeLoop): Set inPos to
+       in.position().
+       (encodeLoop): Likewise.
+
 2005-02-16  Mark Wielaard  <mark@klomp.org>
 
        * Makefile.am (ordinary_java_source_files): Add new files
index c2714363949392a68d1e886d4c3ba63dfebc1f3e..87df64423601f7b72d56057cf5d9207d6947da29 100644 (file)
@@ -101,7 +101,7 @@ final class UTF_8 extends Charset
     protected CoderResult decodeLoop (ByteBuffer in, CharBuffer out)
     {
       // TODO: Optimize this in the case in.hasArray() / out.hasArray()
-      int inPos = 0;
+      int inPos = in.position(); 
       try
         {
           while (in.hasRemaining ())
@@ -196,7 +196,7 @@ final class UTF_8 extends Charset
 
     protected CoderResult encodeLoop (CharBuffer in, ByteBuffer out)
     {
-      int inPos = 0;
+      int inPos = in.position();
       try
         {
           // TODO: Optimize this in the case in.hasArray() / out.hasArray()