question: public static byte [ ] toByteArray ( InputStream in ) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; copy ( in , out ) ; return out . toByteArray ( ) ; }
target:  Reads all bytes from an input stream into a byte array. Does not close the stream.