UTF_8.java (decodeLoop): Set inPos to in.position().

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
This commit is contained in:
Julian Scheid 2005-02-16 23:33:02 +00:00 committed by Mark Wielaard
parent 2f6363f95e
commit cc51f4fb7f
2 changed files with 8 additions and 2 deletions

View 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

View 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()