java.com
Get started with Java today
Oracle Java is the #1 programming language and development platform. It reduces costs, shortens development timeframes, drives innovation, and improves application services.
Oracle Java is the #1 programming language and development platform. It reduces costs, shortens development timeframes, drives innovation, and improves application services.
The stream is already consumed when the second getInputStream() is executed. So I'm forced to write the stream to a temporary file (because it may not fit in a memory resident ByteArrayInputStream), and return a new InputStream object each time.