How do I convert a String to an InputStream in Java? - Stack Overflow

How do I convert a String to an InputStream in Java? - Stack Overflow

瀏覽:725
日期:2025-11-18
4 They used new ByteArrayInputStream(exampleString.getBytes("UTF-8")). So it will be optimized way to use InputStream stream = new ByteArrayInputStream(exampleString.getBytes("UTF-8")); – Pankaj Kumar Aug 24 '11 at 12:34...看更多