public static byte [ ] read ( InputStream pInput ) throws IOException { // Create byte array ByteArrayOutputStream bytes = new FastByteArrayOutputStream ( BUF_SIZE ) ; // Copy from stream to byte array copy ( pInput , bytes ) ; return bytes . toByteArray ( ) ; }
Reads all data from the input stream to a byte array .