Merge pull request #261 from jentfoo/master

Change ByteArrayOutputStream's toString function to match openJDK's expectation
This commit is contained in:
Joel Dice 2014-05-18 14:07:06 -06:00
commit b52f4389b2

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