Java常用类型转换
程序员文章站
2022-04-23 14:10:37
...
InputStream To String
public String inputStream2String(InputStream in) throws IOException { StringBuffer out = new StringBuffer(); byte[] b = new byte[1024]; for (int n; (n = in.read(b)) != -1;) { out.append(new String(b, 0, n)); } return out.toString(); }
上一篇: mybatis07--动态sql
下一篇: StringBuffer