jQuery in Action, 3rd edition
The moose likes Beginning Java and the fly likes String to InputStream ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String to InputStream ?" Watch "String to InputStream ?" New topic

String to InputStream ?

justin wall

Joined: Jul 30, 2001
Posts: 8
I'm using a package call Zql to parse an SQL statement and derive the tables, columns, etc. from it. The parser in Zql is expecting an InputStream and my SQL is in a String variable. Is there a way to convert a String to an InputStream in order to use this package?
Justin Wall
Aaron Webb

Joined: Aug 16, 2001
Posts: 17
String test = "This is a test";
InputStream is = new ByteArrayInputStream(test.getBytes());
I agree. Here's the link: http://aspose.com/file-tools
subject: String to InputStream ?
jQuery in Action, 3rd edition