question: public static byte [ ] readStream ( InputStream stream ) { ByteArrayOutputStream rawBuffer = new ByteArrayOutputStream ( ) ; try { int nRead ; byte [ ] data = new byte [ 1024 * 16 ] ; while ( ( nRead = stream . read ( data , 0 , data . length ) ) != - 1 ) { rawBuffer . write ( data , 0 , nRead ) ; } rawBuffer . flush ( ) ; rawBuffer . close ( ) ; } catch ( IOException e ) { log . warning ( "Error reading audio stream: " + e ) ; } return rawBuffer . toByteArray ( ) ; }
target:  Reads the input stream and returns the corresponding array of bytes