summaryrefslogtreecommitdiff
path: root/java/io
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2006-04-12 16:19:01 +0000
committerTom Tromey <tromey@redhat.com>2006-04-12 16:19:01 +0000
commitb4b7080cd40cef43057d12cf73442736fc3e924c (patch)
tree5691444b6b25ff01f72e3c790414e517f5cce9b8 /java/io
parent792570871a9def2b779add72e5fb6b8256ffc225 (diff)
downloadclasspath-b4b7080cd40cef43057d12cf73442736fc3e924c.tar.gz
* java/io/DataOutputStream.java (writeUTF): Correctly handle zero
length strings.
Diffstat (limited to 'java/io')
-rw-r--r--java/io/DataOutputStream.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/io/DataOutputStream.java b/java/io/DataOutputStream.java
index fcaa97eec..6670c2dba 100644
--- a/java/io/DataOutputStream.java
+++ b/java/io/DataOutputStream.java
@@ -450,7 +450,7 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput
if (buf == null)
buf = new byte[512];
- while (i < len)
+ do
{
while (i < len && pos < buf.length - 3)
{
@@ -483,6 +483,7 @@ public class DataOutputStream extends FilterOutputStream implements DataOutput
write(buf, 0, pos);
pos = 0;
}
+ while (i < len);
}
} // class DataOutputStream