Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileReader from a string..

Status
Not open for further replies.

patnim17

Programmer
Jun 19, 2005
111
US
HI,
I have a String variable that holds the content of a file.
How can I create a FileReader object out of this?

Please help.
pat
 
Well you cannot create a FileReader object from a string because it is a FileReader !

You can however, create a StringReader directly from a string, or a ByteArrayInputStream using the String.getBytes() method. Either of these will probably suit your needs. See the java.io package.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top