diff --git a/classpath/java/io/ByteArrayOutputStream.java b/classpath/java/io/ByteArrayOutputStream.java index 5c05bffa40..264e32833a 100644 --- a/classpath/java/io/ByteArrayOutputStream.java +++ b/classpath/java/io/ByteArrayOutputStream.java @@ -97,6 +97,11 @@ public class ByteArrayOutputStream extends OutputStream { } return array; } + + @Override + public String toString() { + return new String(toByteArray()); + } public String toString(String encoding) throws UnsupportedEncodingException { return new String(toByteArray(), encoding);