### Question:
StringUtils { public static String inputStream2String(InputStream is) { if (is == null) { return null; } try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); int i; while ((i = is.read()) != -1) { baos.write(i); } return baos.toString(Constants.DEFAULT_CHARSET_NAME); } catch (Exception e) { throw new ShouldNeverHappenException(e); } } private  StringUtils(); static boolean isNullOrEmpty(String str); static boolean isBlank(String str); static boolean isNotBlank(String str); static boolean equals(String a, String b); static boolean equalsIgnoreCase(String a, String b); static String inputStream2String(InputStream is); static byte[] inputStream2Bytes(InputStream is); static String toString(Object obj); static String trimToNull(final String str); static String trim(final String str); static boolean isEmpty(final CharSequence cs); static boolean isNotEmpty(final CharSequence cs); static final String EMPTY; }### Answer:
@Test public void testInputStream2String() throws IOException { assertNull(StringUtils.inputStream2String(null)); String data = "abc\n" + ":\"klsdf\n" + "2ks,x:\".,-3sd˚ø≤ø¬≥"; ByteArrayInputStream inputStream = new ByteArrayInputStream(data.getBytes(Constants.DEFAULT_CHARSET)); assertThat(StringUtils.inputStream2String(inputStream)).isEqualTo(data); }