From cc51f4fb7f59ed99a3cf745760cc81c9cc2cccd9 Mon Sep 17 00:00:00 2001 From: Julian Scheid Date: Wed, 16 Feb 2005 23:33:02 +0000 Subject: UTF_8.java (decodeLoop): Set inPos to in.position(). 2005-02-16 Julian Scheid * gnu/java/nio/charset/UTF_8.java (decodeLoop): Set inPos to in.position(). (encodeLoop): Likewise. From-SVN: r95125 --- libjava/gnu/java/nio/charset/UTF_8.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libjava/gnu') diff --git a/libjava/gnu/java/nio/charset/UTF_8.java b/libjava/gnu/java/nio/charset/UTF_8.java index c271436..87df644 100644 --- a/libjava/gnu/java/nio/charset/UTF_8.java +++ b/libjava/gnu/java/nio/charset/UTF_8.java @@ -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() -- cgit v1.1