public static byte [ ] getBytes ( InputStream in ) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; pipeStream ( in , out , 4096 ) ; return out . toByteArray ( ) ; }
Gets a byte array for the given input stream .