Hi, This is something I've noticed too, mainly because of Eclipse complaining about it.
One way to do this is : InputStream inputStream = new ByteArrayInputStream(string.getBytes()); it doesn't seem like the nicest way to do it, but it seems to work. Perhaps someone else has a better suggestion? gilleain On Tue, Aug 18, 2009 at 9:27 PM, David Hall<dwash59_2...@yahoo.com> wrote: > I have an xml string that I want read in by CMLReader. > > Based on some old code, you used to be able to create a java.io.StringReader > and pass that into setReader, which would take a java.io.reader. Now that > causes an exception and the javadoc says "This method must not be used; XML > reading requires the use of an InputStream. Use setReader(InputStream) > instead." > > So, I can do java.io.StringBufferInputStream to create a java.io.InputStream > and pass that in. And it works. But that is deprecated (according to > http://java.sun.com/javase/6/docs/api/java/io/StringBufferInputStream.html ). > > Is there a way to do this that isn't deprecated? I just don't want to go and > change this again if the deprecated method gets dropped in the future. > > Thanks, > David Hall > > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Cdk-user mailing list > Cdk-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/cdk-user > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user