http://docs.oracle.com/javase/7/docs/api/java/io/ByteArrayOutputStream.html
http://docs.oracle.com/javase/7/docs/api/java/io/ByteArrayInputStream.html