如何在Java中将字符串转换为InputStreamReader?
ByteArrayInputStream也可以做到这一点:
ByteArrayInputStream
InputStream is = new ByteArrayInputStream( myString.getBytes( charset ) );