This commit is contained in:
nkorange 2019-12-06 15:04:37 +08:00
parent 38590d060c
commit 38644f5e73

View File

@ -91,6 +91,9 @@ public class IoUtils {
}
static public String toString(InputStream input, String encoding) throws IOException {
if (input == null) {
return StringUtils.EMPTY;
}
return (null == encoding) ? toString(new InputStreamReader(input, Constants.ENCODE))
: toString(new InputStreamReader(input, encoding));
}