If you can use two threads, then use a combination of java.io.PipedInputStream and java.io.PipedOutputStream - one thread writes to the pipe, the other reads from it.
If you must work on a single thread, then you have no choice but to first write all content to a stream of your choice (ByteArrayOutputStream if you it has sustainable memory load, FileOutputStream to a temporary file if it is larger than what your app could bear in RAM), then read it back from there (ByteArrayInputStream or FileInputStream). -- Attila Szegedi home: http://www.szegedi.org ----- Original Message ----- From: "Dahnke, Eric" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 2002. m�rcius 6. 0:28 Subject: OT: IOStreams > Would someone be so kind as to point me in the right direction here. > > I need an OutputStream to InputStream converter (os -> is). > > SOAPmessage.writeTo(java.io.OutputStream os); > SAXParser.parse(java.io.InputStream is, new SAXParseHandler()); > > Is there such a utility or do I need to do it manually write two loops, one > writing the stream out and one reading the stream in? > > > TIA > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > > > > ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
