Change ByteArrayOutputStream's toString function to match openJDK's expectation

This commit is contained in:
Mike Jensen 2014-05-14 17:09:15 -06:00
parent 7273a999bc
commit a7b548f347

View File

@ -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);