Wednesday 14 December 2011

Java: Convert InputStream into byte[]

Requirements io-commons library from apache (http://commons.apache.org/io/)
InputStream is = ...;
byte[] bytes = org.apache.commons.io.IOUtils.toByteArray(is);

References

StackOverflow

No comments:

Post a Comment