Wednesday 14 December 2011

Java: InputStream --> OutputStream

Requirements: IOUtils library from apache (http://commons.apache.org/io/api-1.4/org/apache/commons/io/IOUtils.html)
OutputStream ostream = ...;
InputStream istream = ...;

IOUtils.copy(istrea,ostream);

ostream.close();
istream.close();

References

http://stackoverflow.com/questions/5778658/java-converting-from-outputstream-to-inputstream

No comments:

Post a Comment