java中InputStream & String 的互相转换
<br /> 1 String to InputStream<br />InputStream String2InputStream(String str)<br />{<br />ByteArrayInputStream stream = new ByteArrayInputStream(str.getBytes());<br />return stream;<br />}<br />2 InputStream to String<br />String inputStream2String (Input
原创
2011-02-16 15:44:00 ·
707 阅读 ·
0 评论